Skip to content

Commit fcf27c3

Browse files
committed
Auto merge of #127624 - Oneirical:a-test-of-lime, r=<try>
Migrate and rename `issue-47551`, `issue-35164` and `issue-69368` `run-make` tests to rmake Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). Please try: try-job: x86_64-msvc
2 parents 5d76a13 + 0dd0170 commit fcf27c3

File tree

14 files changed

+55
-37
lines changed

14 files changed

+55
-37
lines changed

src/tools/run-make-support/src/command.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ impl CompletedProcess {
214214
/// Checks that `stderr` does not contain `unexpected`.
215215
#[track_caller]
216216
pub fn assert_stderr_not_contains<S: AsRef<str>>(&self, unexpected: S) -> &Self {
217-
assert_not_contains(&self.stdout_utf8(), unexpected);
217+
assert_not_contains(&self.stderr_utf8(), unexpected);
218218
self
219219
}
220220

src/tools/tidy/src/allowed_run_make_makefiles.txt

-3
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,7 @@ run-make/issue-25581/Makefile
5454
run-make/issue-26006/Makefile
5555
run-make/issue-28595/Makefile
5656
run-make/issue-33329/Makefile
57-
run-make/issue-35164/Makefile
5857
run-make/issue-36710/Makefile
59-
run-make/issue-47551/Makefile
60-
run-make/issue-69368/Makefile
6158
run-make/issue-83045/Makefile
6259
run-make/issue-84395-lto-embed-bitcode/Makefile
6360
run-make/issue-85019-moved-src-dir/Makefile
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Test that previously triggered a linker failure with root cause
2+
// similar to one found in the issue #69368.
3+
//
4+
// The crate that provides oom lang item is missing some other lang
5+
// items. Necessary to prevent the use of start-group / end-group.
6+
//
7+
// The weak lang items are defined in a separate compilation units,
8+
// so that linker could omit them if not used.
9+
//
10+
// The crates that need those weak lang items are dependencies of
11+
// crates that provide them.
12+
// See https://github.com/rust-lang/rust/issues/69371
13+
14+
use run_make_support::rustc;
15+
16+
fn main() {
17+
rustc().input("a.rs").run();
18+
rustc().input("b.rs").run();
19+
rustc().input("c.rs").run();
20+
}

tests/run-make/issue-35164/Makefile

-4
This file was deleted.

tests/run-make/issue-47551/Makefile

-10
This file was deleted.

tests/run-make/issue-69368/Makefile

-19
This file was deleted.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// The byte positions in json format error logging used to have a small, difficult
2+
// to predict offset. This was changed to be the top of the file every time in #42973,
3+
// and this test checks that the measurements appearing in the standard error are correct.
4+
// See https://github.com/rust-lang/rust/issues/35164
5+
6+
use run_make_support::rustc;
7+
8+
fn main() {
9+
rustc()
10+
.input("main.rs")
11+
.error_format("json")
12+
.run()
13+
.assert_stderr_contains(r#""byte_start":23"#)
14+
.assert_stderr_contains(r#""byte_end":29"#);
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// The gcc driver is supposed to add a terminator to link files, and the rustc
2+
// driver previously failed to do this, resulting in a segmentation fault
3+
// with an older version of LLVM. This test checks that the terminator is present
4+
// after the fix in #85395.
5+
// See https://github.com/rust-lang/rust/issues/47551
6+
7+
//FIXME(Oneirical): See if it works on anything other than only linux and 64 bit
8+
9+
use run_make_support::{bin_name, llvm_objdump, run, rustc};
10+
11+
fn main() {
12+
rustc().input("eh_frame-terminator.rs").run();
13+
run("eh_frame-terminator").assert_stdout_contains("1122334455667788");
14+
llvm_objdump()
15+
.arg("--dwarf=frames")
16+
.input(bin_name("eh_frame-terminator"))
17+
.run()
18+
.assert_stdout_contains("ZERO terminator");
19+
}

0 commit comments

Comments
 (0)