diff --git a/tests/misc.rs b/tests/misc.rs index df79e95..aae84da 100644 --- a/tests/misc.rs +++ b/tests/misc.rs @@ -922,8 +922,6 @@ be, to a very large extent, the result of luck. Sherlock Holmes eqnice!(expected, cmd.stdout()); }); -// lz4 decompression tool doesn't work under RISC-V QEMU emulation in CI -#[cfg(not(target_arch = "riscv64"))] rgtest!(compressed_lz4, |dir: Dir, mut cmd: TestCommand| { if !cmd_exists("lz4") { return; @@ -954,8 +952,6 @@ be, to a very large extent, the result of luck. Sherlock Holmes eqnice!(expected, cmd.stdout()); }); -// brotli decompression tool doesn't work under RISC-V QEMU emulation in CI -#[cfg(not(target_arch = "riscv64"))] rgtest!(compressed_brotli, |dir: Dir, mut cmd: TestCommand| { if !cmd_exists("brotli") { return; @@ -971,8 +967,6 @@ be, to a very large extent, the result of luck. Sherlock Holmes eqnice!(expected, cmd.stdout()); }); -// zstd decompression tool doesn't work under RISC-V QEMU emulation in CI -#[cfg(not(target_arch = "riscv64"))] rgtest!(compressed_zstd, |dir: Dir, mut cmd: TestCommand| { if !cmd_exists("zstd") { return; diff --git a/tests/util.rs b/tests/util.rs index e5fb8a6..44d0a51 100644 --- a/tests/util.rs +++ b/tests/util.rs @@ -45,7 +45,10 @@ pub fn sort_lines(lines: &str) -> String { /// Returns true if and only if the given program can be successfully executed /// with a `--help` flag. pub fn cmd_exists(program: &str) -> bool { - Command::new(program).arg("--help").output().is_ok() + match Command::new(program).arg("--help").output() { + Ok(output) => output.status.success(), + Err(_) => false, + } } /// Dir represents a directory in which tests should be run.