about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run-make/rust-lld-compress-debug-sections/rmake.rs18
1 files changed, 4 insertions, 14 deletions
diff --git a/tests/run-make/rust-lld-compress-debug-sections/rmake.rs b/tests/run-make/rust-lld-compress-debug-sections/rmake.rs
index ea4997fab80..9889659046e 100644
--- a/tests/run-make/rust-lld-compress-debug-sections/rmake.rs
+++ b/tests/run-make/rust-lld-compress-debug-sections/rmake.rs
@@ -1,12 +1,13 @@
 // Checks the `compress-debug-sections` option on rust-lld.
 
 //@ needs-rust-lld
+//@ needs-llvm-zstd
 //@ only-linux
 //@ ignore-cross-compile
 
 // FIXME: This test isn't comprehensive and isn't covering all possible combinations.
 
-use run_make_support::{assert_contains, llvm_readobj, run_in_tmpdir, rustc};
+use run_make_support::{llvm_readobj, run_in_tmpdir, rustc};
 
 fn check_compression(compression: &str, to_find: &str) {
     run_in_tmpdir(|| {
@@ -17,19 +18,8 @@ fn check_compression(compression: &str, to_find: &str) {
             .arg("-Cdebuginfo=full")
             .link_arg(&format!("-Wl,--compress-debug-sections={compression}"))
             .input("main.rs")
-            .run_unchecked();
-        let stderr = out.stderr_utf8();
-        if stderr.is_empty() {
-            llvm_readobj().arg("-t").arg("main").run().assert_stdout_contains(to_find);
-        } else {
-            assert_contains(
-                stderr,
-                format!(
-                    "LLVM was not built with LLVM_ENABLE_{to_find} \
-                     or did not find {compression} at build time"
-                ),
-            );
-        }
+            .run();
+        llvm_readobj().arg("-t").arg("main").run().assert_stdout_contains(to_find);
     });
 }