summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/bench/deno_http_native.js6
-rw-r--r--cli/bench/main.rs8
-rw-r--r--cli/tools/installer.rs3
3 files changed, 13 insertions, 4 deletions
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::<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)?;
diff --git a/cli/tools/installer.rs b/cli/tools/installer.rs
index 02dbd71ce..5877494d1 100644
--- a/cli/tools/installer.rs
+++ b/cli/tools/installer.rs
@@ -814,7 +814,10 @@ mod tests {
}
}
+ // This test is disabled because it uses the `deno` binary found in `$PATH`.
+ // It should use the one located in `./target/{debug|release}/`.
#[test]
+ #[ignore]
fn install_unicode() {
let temp_dir = TempDir::new().expect("tempdir fail");
let bin_dir = temp_dir.path().join("bin");