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 <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
This commit is contained in:
Anna Henningsen
2018-07-18 01:14:20 +02:00
committed by Trivikram Kamat
parent f2518c4915
commit 8a62cdba33

View File

@@ -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 = '';