diff --git a/packages/@aws-cdk/integ-runner/README.md b/packages/@aws-cdk/integ-runner/README.md index 0d3b989d31cb1..bc0401ea7d2dc 100644 --- a/packages/@aws-cdk/integ-runner/README.md +++ b/packages/@aws-cdk/integ-runner/README.md @@ -16,7 +16,6 @@ - ## Overview This tool has been created to be used initially by this repo (aws/aws-cdk). Long term the goal is @@ -38,12 +37,15 @@ integ-runner [ARGS] [TEST...] This will look for all files that match the naming convention of `/integ.*.js$/`. Each of these files will be expected to be a self contained CDK app. The runner will execute the following for each file (app): -1. Check if a snapshot file exists (i.e. `/*.snapshot$/`) -2. If the snapshot does not exist - 2a. Synth the integ app which will produce the `integ.json` file +1. Check if snapshot files exist (i.e. `*.snapshot/**`) +2. If the snapshot does not exist\ + a) Synth the integ app which will produce the `integ.json` file 3. Read the `integ.json` file which contains instructions on what the runner should do. 4. Execute instructions +All snapshot files (i.e. `*.snapshot/**`) must be checked-in to version control. +If not, changes cannot be compared across systems. + ### Options - `--update-on-failed` (default=`false`) diff --git a/packages/@aws-cdk/integ-runner/lib/runner/integ-test-runner.ts b/packages/@aws-cdk/integ-runner/lib/runner/integ-test-runner.ts index 0722d4cc8449b..5f71ab392f895 100644 --- a/packages/@aws-cdk/integ-runner/lib/runner/integ-test-runner.ts +++ b/packages/@aws-cdk/integ-runner/lib/runner/integ-test-runner.ts @@ -141,8 +141,9 @@ export class IntegTestRunner extends IntegRunner { }); } catch (e) { logger.warning('%s\n%s', - `Could not checkout snapshot directory ${this.snapshotDir} using these commands: `, - `git merge-base HEAD ${baseBranch} && git checkout {merge-base} -- ${relativeSnapshotDir}`, + `Could not checkout snapshot directory '${this.snapshotDir}'. Please verify the following command completes correctly:`, + `git checkout $(git merge-base HEAD ${baseBranch}) -- ${relativeSnapshotDir}`, + '', ); logger.warning('error: %s', e); }