Skip to content

Commit e2392ca

Browse files
authored
chore: add extra output in CLI integ tests (#24499)
Trying to diagnose what is happening in CodeBuild when the integration tests run for V2, as something appears to hang. Using `process.stderr.write` allows bypassing `jest`'s hijacking of `console.log` and `console.error`, so these traces _always_ show.
1 parent a5c8ea8 commit e2392ca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export function integTest(
3636
output.write('================================================================\n');
3737

3838
try {
39+
process.stderr.write(`▶️ [INTEG TEST::${name}] Starting...\n`);
3940
return await callback({
4041
output,
4142
randomString: randomString(),
@@ -44,13 +45,16 @@ export function integTest(
4445
},
4546
});
4647
} catch (e) {
48+
process.stderr.write(`💥 [INTEG TEST::${name}] Failed: ${e}\n`);
4749
output.write(e.message);
4850
output.write(e.stack);
4951
// Print output only if the test fails. Use 'console.log' so the output is buffered by
5052
// jest and prints without a stack trace (if verbose: false).
5153
// eslint-disable-next-line no-console
5254
console.log(output.buffer().toString());
5355
throw e;
56+
} finally {
57+
process.stderr.write(`⏹️ [INTEG TEST::${name}] Done.\n`);
5458
}
5559
}, timeoutMillis);
5660
}

0 commit comments

Comments
 (0)