Skip to content

Commit

Permalink
Auto merge of rust-lang#127624 - Oneirical:a-test-of-lime, r=<try>
Browse files Browse the repository at this point in the history
Migrate and rename `issue-47551`, `issue-35164` and `issue-69368` `run-make` tests to rmake

Part of rust-lang#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: dist-riscv64-linux
try-job: test-various
try-job: x86_64-msvc
  • Loading branch information
bors committed Jul 12, 2024
2 parents 4a31a6c + 51e47b4 commit dca1656
Show file tree
Hide file tree
Showing 14 changed files with 58 additions and 37 deletions.
2 changes: 1 addition & 1 deletion src/tools/run-make-support/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ impl CompletedProcess {
/// Checks that `stderr` does not contain `unexpected`.
#[track_caller]
pub fn assert_stderr_not_contains<S: AsRef<str>>(&self, unexpected: S) -> &Self {
assert_not_contains(&self.stdout_utf8(), unexpected);
assert_not_contains(&self.stderr_utf8(), unexpected);
self
}

Expand Down
3 changes: 0 additions & 3 deletions src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ run-make/issue-25581/Makefile
run-make/issue-26006/Makefile
run-make/issue-28595/Makefile
run-make/issue-33329/Makefile
run-make/issue-35164/Makefile
run-make/issue-36710/Makefile
run-make/issue-47551/Makefile
run-make/issue-69368/Makefile
run-make/issue-83045/Makefile
run-make/issue-84395-lto-embed-bitcode/Makefile
run-make/issue-85019-moved-src-dir/Makefile
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions tests/run-make/crate-circular-deps-link/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Test that previously triggered a linker failure with root cause
// similar to one found in the issue #69368.
//
// The crate that provides oom lang item is missing some other lang
// items. Necessary to prevent the use of start-group / end-group.
//
// The weak lang items are defined in a separate compilation units,
// so that linker could omit them if not used.
//
// The crates that need those weak lang items are dependencies of
// crates that provide them.
// See https://github.com/rust-lang/rust/issues/69371

//FIXME(Oneirical): try it on test-various

use run_make_support::rustc;

fn main() {
rustc().input("a.rs").run();
rustc().input("b.rs").run();
rustc().input("c.rs").run();
}
4 changes: 0 additions & 4 deletions tests/run-make/issue-35164/Makefile

This file was deleted.

10 changes: 0 additions & 10 deletions tests/run-make/issue-47551/Makefile

This file was deleted.

19 changes: 0 additions & 19 deletions tests/run-make/issue-69368/Makefile

This file was deleted.

File renamed without changes.
15 changes: 15 additions & 0 deletions tests/run-make/json-error-no-offset/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// The byte positions in json format error logging used to have a small, difficult
// to predict offset. This was changed to be the top of the file every time in #42973,
// and this test checks that the measurements appearing in the standard error are correct.
// See https://github.com/rust-lang/rust/issues/35164

use run_make_support::rustc;

fn main() {
rustc()
.input("main.rs")
.error_format("json")
.run()
.assert_stderr_contains(r#""byte_start":23"#)
.assert_stderr_contains(r#""byte_end":29"#);
}
File renamed without changes.
20 changes: 20 additions & 0 deletions tests/run-make/link-eh-frame-terminator/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// The gcc driver is supposed to add a terminator to link files, and the rustc
// driver previously failed to do this, resulting in a segmentation fault
// with an older version of LLVM. This test checks that the terminator is present
// after the fix in #85395.
// See https://github.com/rust-lang/rust/issues/47551

//FIXME(Oneirical): See if it works on anything other than only linux and 64 bit
// maybe riscv64gc-unknown-linux-gnu

use run_make_support::{llvm_objdump, run, rustc};

fn main() {
rustc().input("eh_frame-terminator.rs").run();
run("eh_frame-terminator").assert_stdout_contains("1122334455667788");
llvm_objdump()
.arg("--dwarf=frames")
.input("eh_frame-terminator")
.run()
.assert_stdout_contains("ZERO terminator");
}

0 comments on commit dca1656

Please sign in to comment.