From 56dedf84babc51e1a20b3a697c2e47c7d5d4cf09 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Wed, 25 Sep 2019 15:50:58 -0700 Subject: [PATCH] test(builtin): print out debug info in bazel_integration_test when DEBUG or VERBOSE_LOGS set --- internal/bazel_integration_test/test_runner.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/internal/bazel_integration_test/test_runner.js b/internal/bazel_integration_test/test_runner.js index 783929d437..255373f15b 100644 --- a/internal/bazel_integration_test/test_runner.js +++ b/internal/bazel_integration_test/test_runner.js @@ -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) {