Skip to content

Commit 7e23080

Browse files
addaleaxtargos
authored andcommitted
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: #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>
1 parent 52020dc commit 7e23080

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/common/benchmark.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ function runBenchmark(name, args, env) {
2020

2121
const mergedEnv = Object.assign({}, process.env, env);
2222

23-
const child = fork(runjs, argv, { env: mergedEnv, stdio: 'pipe' });
23+
const child = fork(runjs, argv, {
24+
env: mergedEnv,
25+
stdio: ['inherit', 'pipe', 'inherit', 'ipc']
26+
});
2427
child.stdout.setEncoding('utf8');
2528

2629
let stdout = '';

0 commit comments

Comments
 (0)