Skip to content

Commit

Permalink
chore: add some debugging to regression test skipping (#29332)
Browse files Browse the repository at this point in the history
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*
  • Loading branch information
rix0rrr committed Mar 1, 2024
1 parent 63390e1 commit 0d6ef63
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
9 changes: 6 additions & 3 deletions packages/@aws-cdk-testing/cli-integ/bin/apply-patches
Expand Up @@ -14,6 +14,9 @@ fi

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

if [[ -f "$candidate_dir" ]]; then
cp -R "${candidate_dir}/"* "$2"
fi
if [[ -d "$candidate_dir" ]]; then
echo "Found patch directory: ${candidate_dir}"
cp -vR "${candidate_dir}/"* "$2"
else
echo "No patch directory named: ${candidate_dir}"
fi
11 changes: 9 additions & 2 deletions packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts
Expand Up @@ -2,7 +2,14 @@ import * as fs from 'fs';
import * as path from 'path';
import { MemoryStream } from './corking';

const SKIP_TESTS = fs.readFileSync(path.join(__dirname, '..', 'skip-tests.txt'), { encoding: 'utf-8' }).split('\n');
const SKIP_TESTS = fs.readFileSync(path.join(__dirname, '..', 'skip-tests.txt'), { encoding: 'utf-8' })
.split('\n')
.map(x => x.trim())
.filter(x => x && !x.startsWith('#'));

if (SKIP_TESTS) {
process.stderr.write(`ℹ️ Skipping tests: ${JSON.stringify(SKIP_TESTS)}\n`);
}

export interface TestContext {
readonly randomString: string;
Expand All @@ -11,7 +18,7 @@ export interface TestContext {
};

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

/**
Expand Down

0 comments on commit 0d6ef63

Please sign in to comment.