Skip to content

Commit cca9b2e

Browse files
Migrate run-make/compressed-debuginfo to rmake.rs
1 parent c1f62a7 commit cca9b2e

File tree

3 files changed

+28
-15
lines changed

3 files changed

+28
-15
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ run-make/comment-section/Makefile
1515
run-make/compiler-lookup-paths-2/Makefile
1616
run-make/compiler-lookup-paths/Makefile
1717
run-make/compiler-rt-works-on-mingw/Makefile
18-
run-make/compressed-debuginfo/Makefile
1918
run-make/crate-hash-rustc-version/Makefile
2019
run-make/crate-name-priority/Makefile
2120
run-make/cross-lang-lto-clang/Makefile

tests/run-make/compressed-debuginfo/Makefile

-14
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Checks the `debuginfo-compression` option.
2+
3+
//@ only-linux
4+
//@ ignore-cross-compile
5+
6+
use run_make_support::{assert_contains, cmd, path, rustc};
7+
8+
fn check_compression(compression: &str, to_find: &str) {
9+
let out = rustc()
10+
.crate_name("foo")
11+
.crate_type("lib")
12+
.emit("obj")
13+
.arg("-Cdebuginfo=full")
14+
.arg(&format!("-Zdebuginfo-compression={compression}"))
15+
.input("foo.rs")
16+
.run();
17+
let stderr = out.stderr_utf8();
18+
if stderr.is_empty() {
19+
cmd("readelf").arg("-t").arg(path("foo.o")).run().assert_stdout_contains(to_find);
20+
} else {
21+
assert_contains(&stderr, &format!("unknown debuginfo compression algorithm {compression}"));
22+
}
23+
}
24+
25+
fn main() {
26+
check_compression("zlib", "ZLIB");
27+
check_compression("zstd", "ZSTD");
28+
}

0 commit comments

Comments
 (0)