Skip to content

Commit 45313a6

Browse files
committed
rewrite test-harness to rmake
1 parent b75dd71 commit 45313a6

File tree

10 files changed

+29
-13
lines changed

10 files changed

+29
-13
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ run-make/metadata-dep-info/Makefile
9696
run-make/min-global-align/Makefile
9797
run-make/missing-crate-dependency/Makefile
9898
run-make/mixing-libs/Makefile
99-
run-make/msvc-opt-minsize/Makefile
10099
run-make/native-link-modifier-bundle/Makefile
101100
run-make/native-link-modifier-whole-archive/Makefile
102101
run-make/no-alloc-shim/Makefile
@@ -163,7 +162,6 @@ run-make/target-cpu-native/Makefile
163162
run-make/target-specs/Makefile
164163
run-make/target-without-atomic-cas/Makefile
165164
run-make/test-benches/Makefile
166-
run-make/test-harness/Makefile
167165
run-make/thumb-none-cortex-m/Makefile
168166
run-make/thumb-none-qemu/Makefile
169167
run-make/track-path-dep-info/Makefile

src/tools/tidy/src/ui_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::path::{Path, PathBuf};
1313
// should all be 1000 or lower. Limits significantly smaller than 1000 are also
1414
// desirable, because large numbers of files are unwieldy in general. See issue
1515
// #73494.
16-
const ENTRY_LIMIT: u32 = 900;
16+
const ENTRY_LIMIT: u32 = 901;
1717
// FIXME: The following limits should be reduced eventually.
1818

1919
const ISSUES_ENTRY_LIMIT: u32 = 1672;

tests/run-make/include-all-symbols-linking/rmake.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
// See https://github.com/rust-lang/rust/pull/95604
88
// See https://github.com/rust-lang/rust/issues/47384
99

10-
//FIXME(Oneirical): ignore flags: only linux and cross compile
10+
//@ only-linux
11+
// Reason: differences in object file formats on OSX and Windows
12+
// causes errors in the llvm_objdump step
1113

1214
use run_make_support::{dynamic_lib_name, llvm_objdump, llvm_readobj, rustc};
1315

tests/run-make/test-harness/Makefile

-9
This file was deleted.

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

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
assert_eq!(
20+
// One of the lines is exactly "i."
21+
run_with_args("test-ignore-cfg", &["--quiet"]).stdout_utf8().lines().find(|&x| x == "i."),
22+
Some("i.")
23+
);
24+
run_with_args("test-ignore-cfg", &["--quiet"]).assert_stdout_not_contains("should");
25+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)