aboutsummaryrefslogtreecommitdiff
path: root/test/parallel
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2018-11-29 20:25:03 +0800
committerRich Trott <rtrott@gmail.com>2018-12-01 14:31:53 -0800
commit3fb627bead14e68d989b0f141226c1703fa062ca (patch)
treebe38a6a9d08b9f94f0896c04397f53df6d754391 /test/parallel
parent67d4123a5a1240200ad304631adbd406e9b9f8ea (diff)
downloadandroid-node-v8-3fb627bead14e68d989b0f141226c1703fa062ca.tar.gz
android-node-v8-3fb627bead14e68d989b0f141226c1703fa062ca.tar.bz2
android-node-v8-3fb627bead14e68d989b0f141226c1703fa062ca.zip
test: show stdout and stderr in test-cli-syntax when it fails
To help debugging the flake with the log from the CI. PR-URL: https://github.com/nodejs/node/pull/24720 Refs: https://github.com/nodejs/node/issues/24403 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/parallel')
-rw-r--r--test/parallel/test-cli-syntax.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/parallel/test-cli-syntax.js b/test/parallel/test-cli-syntax.js
index d80e8c698d..35cc78258d 100644
--- a/test/parallel/test-cli-syntax.js
+++ b/test/parallel/test-cli-syntax.js
@@ -34,6 +34,12 @@ const notFoundRE = /^Error: Cannot find module/m;
const cmd = [node, ..._args].join(' ');
exec(cmd, common.mustCall((err, stdout, stderr) => {
+ if (err) {
+ console.log('-- stdout --');
+ console.log(stdout);
+ console.log('-- stderr --');
+ console.log(stderr);
+ }
assert.ifError(err);
assert.strictEqual(stdout, '');
assert.strictEqual(stderr, '');