Refactor compressed-debuginfo to use llvm_readobj

This commit is contained in:
Jerry Wang 2024-06-23 17:44:58 -04:00
parent 0c1df370ca
commit 2ef269953a

View File

@ -5,7 +5,7 @@
// FIXME: This test isn't comprehensive and isn't covering all possible combinations. // FIXME: This test isn't comprehensive and isn't covering all possible combinations.
use run_make_support::{assert_contains, cmd, run_in_tmpdir, rustc}; use run_make_support::{assert_contains, cmd, llvm_readobj, run_in_tmpdir, rustc};
fn check_compression(compression: &str, to_find: &str) { fn check_compression(compression: &str, to_find: &str) {
run_in_tmpdir(|| { run_in_tmpdir(|| {
@ -19,8 +19,7 @@ fn check_compression(compression: &str, to_find: &str) {
.run(); .run();
let stderr = out.stderr_utf8(); let stderr = out.stderr_utf8();
if stderr.is_empty() { if stderr.is_empty() {
// FIXME: `readelf` might need to be replaced with `llvm-readelf`. llvm_readobj().arg("-t").arg("foo.o").run().assert_stdout_contains(to_find);
cmd("readelf").arg("-t").arg("foo.o").run().assert_stdout_contains(to_find);
} else { } else {
assert_contains( assert_contains(
&stderr, &stderr,