From e02403bb4590da6823eb956bcbc89e9a937d431d Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Tue, 11 May 2021 22:06:58 +0000 Subject: ci: run Linux release builds in sysroot with Ubuntu 18.04 and LLVM (#10920) --- cli/bench/deno_http_native.js | 6 +++++- cli/bench/main.rs | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'cli/bench') diff --git a/cli/bench/deno_http_native.js b/cli/bench/deno_http_native.js index 4c06bd7c1..2b576255e 100644 --- a/cli/bench/deno_http_native.js +++ b/cli/bench/deno_http_native.js @@ -12,7 +12,11 @@ for await (const conn of listener) { (async () => { const requests = Deno.serveHttp(conn); for await (const { respondWith } of requests) { - respondWith(new Response(body)); + try { + respondWith(new Response(body)); + } catch { + // Ignore. + } } })(); } 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::::new(); let mut syscall_count = HashMap::::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)?; -- cgit v1.2.3