From 0d6ef63e04ed0301e40684594266e83b50dce186 Mon Sep 17 00:00:00 2001 From: Rico Hermans Date: Fri, 1 Mar 2024 15:35:48 +0100 Subject: [PATCH] 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* --- packages/@aws-cdk-testing/cli-integ/bin/apply-patches | 9 ++++++--- packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts | 11 +++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk-testing/cli-integ/bin/apply-patches b/packages/@aws-cdk-testing/cli-integ/bin/apply-patches index b27d0c93dc9e7..30229625387a9 100755 --- a/packages/@aws-cdk-testing/cli-integ/bin/apply-patches +++ b/packages/@aws-cdk-testing/cli-integ/bin/apply-patches @@ -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 \ No newline at end of file +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 diff --git a/packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts b/packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts index 5ad6596cf1b77..b4655461b5f57 100644 --- a/packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts @@ -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; @@ -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'); } /**