Skip to content

Commit 2019f15

Browse files
committed
rewrite test-harness to rmake
1 parent 57894c1 commit 2019f15

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-11
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ run-make/mingw-export-call-convention/Makefile
106106
run-make/mismatching-target-triples/Makefile
107107
run-make/missing-crate-dependency/Makefile
108108
run-make/mixing-libs/Makefile
109-
run-make/msvc-opt-minsize/Makefile
110109
run-make/native-link-modifier-bundle/Makefile
111110
run-make/native-link-modifier-whole-archive/Makefile
112111
run-make/no-alloc-shim/Makefile
@@ -181,7 +180,6 @@ run-make/target-cpu-native/Makefile
181180
run-make/target-specs/Makefile
182181
run-make/target-without-atomic-cas/Makefile
183182
run-make/test-benches/Makefile
184-
run-make/test-harness/Makefile
185183
run-make/thumb-none-cortex-m/Makefile
186184
run-make/thumb-none-qemu/Makefile
187185
run-make/track-path-dep-info/Makefile

tests/run-make/test-harness/Makefile

-9
This file was deleted.

tests/run-make/test-harness/rmake.rs

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// The way test suites run can be modified using configuration flags,
2+
// ignoring certain tests while running others. This test contains two
3+
// functions, one which must run and the other which must not. The standard
4+
// output is checked to verify that the ignore configuration is doing its job,
5+
// and that output is successfully minimized with the --quiet flag.
6+
// See https://github.com/rust-lang/rust/commit/f7ebe23ae185991b0fee05b32fbb3e29b89a41bf
7+
8+
//@ ignore-cross-compile
9+
// Reason: the compiled binary is executed
10+
11+
use run_make_support::{run, run_with_args, rustc};
12+
13+
fn main() {
14+
rustc().arg("--test").input("test-ignore-cfg.rs").cfg("ignorecfg").run();
15+
// check that #[cfg_attr(..., ignore)] does the right thing.
16+
run("test-ignore-cfg")
17+
.assert_stdout_contains("shouldnotignore ... ok")
18+
.assert_stdout_contains("shouldignore ... ignored");
19+
run_with_args("test-ignore-cfg", &["--quiet"]).assert_stdout_contains("i.");
20+
run_with_args("test-ignore-cfg", &["--quiet"]).assert_stdout_not_contains("should");
21+
}

0 commit comments

Comments
 (0)