diff options
author | Bert Belder <bertbelder@gmail.com> | 2021-05-11 22:06:58 +0000 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2021-06-23 19:36:05 +0000 |
commit | e02403bb4590da6823eb956bcbc89e9a937d431d (patch) | |
tree | a7fd05604ee093c63692c6434911300204d3cd32 /cli/bench/main.rs | |
parent | 6f8975ad786e3c8f7cc6fe0f374e704f06741b18 (diff) |
ci: run Linux release builds in sysroot with Ubuntu 18.04 and LLVM (#10920)
Diffstat (limited to 'cli/bench/main.rs')
-rw-r--r-- | cli/bench/main.rs | 8 |
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)?; |