From 7e23080d45dbc00d3acfddb8bdbd5ba36540d088 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Wed, 18 Jul 2018 01:14:20 +0200 Subject: [PATCH] test: pass through stderr in benchmark tests This helps a lot with debugging failing benchmark tests, which would otherwise just print an assertion for the exit code (something like `+1 -0`, which yields almost no information about a failure). PR-URL: https://github.com/nodejs/node/pull/21860 Reviewed-By: Rich Trott Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Trivikram Kamat Reviewed-By: Gabriel Schulhof --- test/common/benchmark.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/common/benchmark.js b/test/common/benchmark.js index f8952a8b9ad647..0894146c4d1443 100644 --- a/test/common/benchmark.js +++ b/test/common/benchmark.js @@ -20,7 +20,10 @@ function runBenchmark(name, args, env) { const mergedEnv = Object.assign({}, process.env, env); - const child = fork(runjs, argv, { env: mergedEnv, stdio: 'pipe' }); + const child = fork(runjs, argv, { + env: mergedEnv, + stdio: ['inherit', 'pipe', 'inherit', 'ipc'] + }); child.stdout.setEncoding('utf8'); let stdout = '';