Skip to content

Commit 290a260

Browse files
committed
run cross-lang-lto-pgo-smoketest in CI by renaming it
1 parent 560e86d commit 290a260

File tree

12 files changed

+35
-142
lines changed

12 files changed

+35
-142
lines changed

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

-7
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,6 @@ impl CompletedProcess {
258258
self
259259
}
260260

261-
/// Checks that `stderr` does not contain the regex pattern `unexpected`.
262-
#[track_caller]
263-
pub fn assert_stderr_not_contains_regex<S: AsRef<str>>(&self, unexpected: S) -> &Self {
264-
assert_not_contains_regex(&self.stdout_utf8(), unexpected);
265-
self
266-
}
267-
268261
#[track_caller]
269262
pub fn assert_exit_code(&self, code: i32) -> &Self {
270263
assert!(self.output.status.code() == Some(code));

src/tools/run-make-support/src/external_deps/llvm.rs

+6
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,12 @@ impl LlvmObjdump {
246246
self.cmd.arg(path.as_ref());
247247
self
248248
}
249+
250+
/// Disassemble all executable sections found in the input files.
251+
pub fn disassemble(&mut self) -> &mut Self {
252+
self.cmd.arg("-d");
253+
self
254+
}
249255
}
250256

251257
impl LlvmAr {

tests/run-make/cross-lang-lto-clang/_Makefile

-29
This file was deleted.

tests/run-make/cross-lang-lto-clang/rmake.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
// See https://github.com/rust-lang/rust/pull/57514
44

55
//@ needs-force-clang-based-tests
6-
// FIXME(#126180): This test doesn't actually run anywhere, because the only
7-
// CI job that sets RUSTBUILD_FORCE_CLANG_BASED_TESTS runs very few tests.
6+
// NOTE(#126180): This test only runs on `x86_64-gnu-debug`, because that CI job sets
7+
// RUSTBUILD_FORCE_CLANG_BASED_TESTS and only runs tests which contain "clang" in their
8+
// name.
89

910
use run_make_support::{clang, env_var, llvm_ar, llvm_objdump, rustc, static_lib_name};
1011

@@ -27,14 +28,14 @@ fn main() {
2728
// Make sure we don't find a call instruction to the function we expect to
2829
// always be inlined.
2930
llvm_objdump()
30-
.arg("-d")
31+
.disassemble()
3132
.input("cmain")
3233
.run()
3334
.assert_stdout_not_contains_regex("call.*rust_always_inlined");
3435
// As a sanity check, make sure we do find a call instruction to a
3536
// non-inlined function
3637
llvm_objdump()
37-
.arg("-d")
38+
.disassemble()
3839
.input("cmain")
3940
.run()
4041
.assert_stdout_contains_regex("call.*rust_never_inlined");
@@ -49,12 +50,12 @@ fn main() {
4950
.output("rsmain")
5051
.run();
5152
llvm_objdump()
52-
.arg("-d")
53+
.disassemble()
5354
.input("rsmain")
5455
.run()
5556
.assert_stdout_not_contains_regex("call.*c_always_inlined");
5657
llvm_objdump()
57-
.arg("-d")
58+
.disassemble()
5859
.input("rsmain")
5960
.run()
6061
.assert_stdout_contains_regex("call.*c_never_inlined");

tests/run-make/cross-lang-lto-pgo-smoketest/rmake.rs tests/run-make/cross-lang-lto-pgo-smoketest-clang/rmake.rs

+13-4
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,23 @@
55
// See https://github.com/rust-lang/rust/pull/61036
66

77
//@ needs-force-clang-based-tests
8-
// FIXME(#126180): This test doesn't actually run anywhere, because the only
9-
// CI job that sets RUSTBUILD_FORCE_CLANG_BASED_TESTS runs very few tests.
8+
// NOTE(#126180): This test would only run on `x86_64-gnu-debug`, because that CI job sets
9+
// RUSTBUILD_FORCE_CLANG_BASED_TESTS and only runs tests which contain "clang" in their
10+
// name.
11+
12+
//@ needs-profiler-support
13+
// FIXME(Oneirical): Except that due to the reliance on llvm-profdata, this test
14+
// never runs, because `x86_64-gnu-debug` does not have the `profiler_builtins` crate.
1015

1116
//FIXME(Oneirical): There was a strange workaround for MSVC on this test
1217
// which added -C panic=abort to every RUSTC call. It was justified as follows:
13-
// LLVM doesn't support instrumenting binaries that use SEH:
18+
19+
// "LLVM doesn't support instrumenting binaries that use SEH:
1420
// https://bugs.llvm.org/show_bug.cgi?id=41279
15-
// Things work fine with -Cpanic=abort though.
21+
// Things work fine with -Cpanic=abort though."
22+
23+
// This isn't very pertinent, however, as the test does not get run on any
24+
// MSVC platforms.
1625

1726
use run_make_support::{
1827
clang, env_var, has_extension, has_prefix, llvm_ar, llvm_profdata, rfs, run, rustc,

tests/run-make/cross-lang-lto-pgo-smoketest/_Makefile

-94
This file was deleted.

tests/run-make/cross-lang-lto-riscv-abi/rmake.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
//@ needs-force-clang-based-tests
44
//@ needs-llvm-components riscv
55

6-
// FIXME(#126180): This test doesn't actually run anywhere, because the only
7-
// CI job that sets RUSTBUILD_FORCE_CLANG_BASED_TESTS runs very few tests.
6+
//@ needs-force-clang-based-tests
7+
// FIXME(#126180): This test can only run on `x86_64-gnu-debug`, because that CI job sets
8+
// RUSTBUILD_FORCE_CLANG_BASED_TESTS and only runs tests which contain "clang" in their
9+
// name.
10+
// However, this test does not run at all as its name does not contain "clang".
811

912
use std::path::PathBuf;
1013
use std::process::{Command, Output};

tests/run-make/wasm-override-linker/rmake.rs

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
// $ RUSTBUILD_FORCE_CLANG_BASED_TESTS=1 ./x.py test tests/run-make/wasm-override-linker/
33

44
//@ needs-force-clang-based-tests
5+
// FIXME(#126180): This test can only run on `x86_64-gnu-debug`, because that CI job sets
6+
// RUSTBUILD_FORCE_CLANG_BASED_TESTS and only runs tests which contain "clang" in their
7+
// name.
8+
// However, this test does not run at all as its name does not contain "clang".
59

610
use run_make_support::{env_var, rustc, target};
711

0 commit comments

Comments
 (0)