summaryrefslogtreecommitdiff
path: root/cli/bench/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/bench/main.rs')
-rw-r--r--cli/bench/main.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/cli/bench/main.rs b/cli/bench/main.rs
index d19731faa..c7a6a714e 100644
--- a/cli/bench/main.rs
+++ b/cli/bench/main.rs
@@ -340,10 +340,10 @@ fn run_strace_benchmarks(
let mut thread_count = HashMap::<String, u64>::new();
let mut syscall_count = HashMap::<String, u64>::new();
- for (name, args, _) in EXEC_TIME_BENCHMARKS {
+ for (name, args, expected_exit_code) in EXEC_TIME_BENCHMARKS {
let mut file = tempfile::NamedTempFile::new()?;
- Command::new("strace")
+ let exit_status = Command::new("strace")
.args(&[
"-c",
"-f",
@@ -352,9 +352,11 @@ fn run_strace_benchmarks(
deno_exe.to_str().unwrap(),
])
.args(args.iter())
- .stdout(Stdio::inherit())
+ .stdout(Stdio::null())
.spawn()?
.wait()?;
+ let expected_exit_code = expected_exit_code.unwrap_or(0);
+ assert_eq!(exit_status.code(), Some(expected_exit_code));
let mut output = String::new();
file.as_file_mut().read_to_string(&mut output)?;