Skip to content

Commit

Permalink
test(builtin): print out debug info in bazel_integration_test when DE…
Browse files Browse the repository at this point in the history
…BUG or VERBOSE_LOGS set
  • Loading branch information
gregmagolan authored and alexeagle committed Sep 26, 2019
1 parent 9be9a47 commit 56dedf8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions internal/bazel_integration_test/test_runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,20 @@ const isWindows = process.platform === 'win32';
const bazelBinary =
require.resolve(`${config.bazelBinaryWorkspace}/bazel${isWindows ? '.exe' : ''}`);

if (DEBUG || VERBOSE_LOGS) {
// If DEBUG is set then the tmp folders created by the `tmp.dirSync` are not
// cleaned up so we should log out the location of the workspace under test
// tmp folder in that case even if VERBOSE_LOGS is not set as it may be useful
// to `cd /path/to/workspace/tmp` for manual testing at that point.
log(`
********************************************************************************
bazel binary under test is ${bazelBinary}
workspace under test root is ${workspaceRoot}
********************************************************************************
`);
}

log(`running 'bazel version'`);
let spawnedProcess = spawnSync(bazelBinary, ['version'], {cwd: workspaceRoot, stdio: 'inherit'});
if (spawnedProcess.status) {
Expand Down

0 comments on commit 56dedf8

Please sign in to comment.