Skip to content

Commit

Permalink
test: pass through stderr in benchmark tests
Browse files Browse the repository at this point in the history
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: #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>
  • Loading branch information
addaleax authored and targos committed Aug 1, 2018
1 parent 52020dc commit 7e23080
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/common/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down

0 comments on commit 7e23080

Please sign in to comment.