Skip to content

Commit 0d6ef63

Browse files
authored
chore: add some debugging to regression test skipping (#29332)
The regression test skipping mechanism doesn't seem to be working. Investigate what's going on by adding print logging. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 63390e1 commit 0d6ef63

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

packages/@aws-cdk-testing/cli-integ/bin/apply-patches

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ fi
1414

1515
candidate_dir="${scriptdir}/../resources/cli-regression-patches/v${version}"
1616

17-
if [[ -f "$candidate_dir" ]]; then
18-
cp -R "${candidate_dir}/"* "$2"
19-
fi
17+
if [[ -d "$candidate_dir" ]]; then
18+
echo "Found patch directory: ${candidate_dir}"
19+
cp -vR "${candidate_dir}/"* "$2"
20+
else
21+
echo "No patch directory named: ${candidate_dir}"
22+
fi

packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@ import * as fs from 'fs';
22
import * as path from 'path';
33
import { MemoryStream } from './corking';
44

5-
const SKIP_TESTS = fs.readFileSync(path.join(__dirname, '..', 'skip-tests.txt'), { encoding: 'utf-8' }).split('\n');
5+
const SKIP_TESTS = fs.readFileSync(path.join(__dirname, '..', 'skip-tests.txt'), { encoding: 'utf-8' })
6+
.split('\n')
7+
.map(x => x.trim())
8+
.filter(x => x && !x.startsWith('#'));
9+
10+
if (SKIP_TESTS) {
11+
process.stderr.write(`ℹ️ Skipping tests: ${JSON.stringify(SKIP_TESTS)}\n`);
12+
}
613

714
export interface TestContext {
815
readonly randomString: string;
@@ -11,7 +18,7 @@ export interface TestContext {
1118
};
1219

1320
if (process.env.JEST_TEST_CONCURRENT === 'true') {
14-
process.stderr.write('ℹ️ JEST_TEST_CONCURRENT is true: tests will run concurrently and filters have no effect!');
21+
process.stderr.write('ℹ️ JEST_TEST_CONCURRENT is true: tests will run concurrently and filters have no effect!\n0');
1522
}
1623

1724
/**

0 commit comments

Comments
 (0)