Skip to content

Commit 28d461d

Browse files
authored
Merge pull request #780 from rust-lang/remove-failing-tests
Remove passing tests from failing-ui-tests.txt
2 parents a949fa1 + a93f531 commit 28d461d

File tree

2 files changed

+33
-43
lines changed

2 files changed

+33
-43
lines changed

build_system/src/test.rs

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,7 @@ fn test_rustc_inner<F>(
910910
prepare_files_callback: F,
911911
run_error_pattern_test: bool,
912912
test_type: &str,
913+
run_ignored_tests: bool,
913914
) -> Result<(), String>
914915
where
915916
F: Fn(&Path) -> Result<bool, String>,
@@ -944,17 +945,7 @@ where
944945
rust_path.join("tests/ui"),
945946
&mut |dir| {
946947
let dir_name = dir.file_name().and_then(|name| name.to_str()).unwrap_or("");
947-
if [
948-
"abi",
949-
"extern",
950-
"unsized-locals",
951-
"proc-macro",
952-
"threads-sendsync",
953-
"borrowck",
954-
"test-attrs",
955-
]
956-
.contains(&dir_name)
957-
{
948+
if ["abi", "extern", "proc-macro", "threads-sendsync"].contains(&dir_name) {
958949
remove_dir_all(dir).map_err(|error| {
959950
format!("Failed to remove folder `{}`: {:?}", dir.display(), error)
960951
})?;
@@ -1061,30 +1052,34 @@ where
10611052

10621053
env.get_mut("RUSTFLAGS").unwrap().clear();
10631054

1064-
run_command_with_output_and_env(
1065-
&[
1066-
&"./x.py",
1067-
&"test",
1068-
&"--run",
1069-
&"always",
1070-
&"--stage",
1071-
&"0",
1072-
&"--set",
1073-
&"build.compiletest-allow-stage0=true",
1074-
&format!("tests/{test_type}"),
1075-
&"--compiletest-rustc-args",
1076-
&rustc_args,
1077-
],
1078-
Some(&rust_path),
1079-
Some(&env),
1080-
)?;
1055+
let test_dir = format!("tests/{test_type}");
1056+
let mut command: Vec<&dyn AsRef<OsStr>> = vec![
1057+
&"./x.py",
1058+
&"test",
1059+
&"--run",
1060+
&"always",
1061+
&"--stage",
1062+
&"0",
1063+
&"--set",
1064+
&"build.compiletest-allow-stage0=true",
1065+
&test_dir,
1066+
&"--compiletest-rustc-args",
1067+
&rustc_args,
1068+
];
1069+
1070+
if run_ignored_tests {
1071+
command.push(&"--");
1072+
command.push(&"--ignored");
1073+
}
1074+
1075+
run_command_with_output_and_env(&command, Some(&rust_path), Some(&env))?;
10811076
Ok(())
10821077
}
10831078

10841079
fn test_rustc(env: &Env, args: &TestArg) -> Result<(), String> {
1085-
test_rustc_inner(env, args, |_| Ok(false), false, "run-make")?;
1086-
test_rustc_inner(env, args, |_| Ok(false), false, "run-make-cargo")?;
1087-
test_rustc_inner(env, args, |_| Ok(false), false, "ui")
1080+
test_rustc_inner(env, args, |_| Ok(false), false, "run-make", false)?;
1081+
test_rustc_inner(env, args, |_| Ok(false), false, "run-make-cargo", false)?;
1082+
test_rustc_inner(env, args, |_| Ok(false), false, "ui", false)
10881083
}
10891084

10901085
fn test_failing_rustc(env: &Env, args: &TestArg) -> Result<(), String> {
@@ -1094,6 +1089,7 @@ fn test_failing_rustc(env: &Env, args: &TestArg) -> Result<(), String> {
10941089
retain_files_callback("tests/failing-run-make-tests.txt", "run-make"),
10951090
false,
10961091
"run-make",
1092+
true,
10971093
);
10981094

10991095
let run_make_cargo_result = test_rustc_inner(
@@ -1102,6 +1098,7 @@ fn test_failing_rustc(env: &Env, args: &TestArg) -> Result<(), String> {
11021098
retain_files_callback("tests/failing-run-make-tests.txt", "run-make-cargo"),
11031099
false,
11041100
"run-make",
1101+
true,
11051102
);
11061103

11071104
let ui_result = test_rustc_inner(
@@ -1110,6 +1107,7 @@ fn test_failing_rustc(env: &Env, args: &TestArg) -> Result<(), String> {
11101107
retain_files_callback("tests/failing-ui-tests.txt", "ui"),
11111108
false,
11121109
"ui",
1110+
true,
11131111
);
11141112

11151113
run_make_result.and(run_make_cargo_result).and(ui_result)
@@ -1122,20 +1120,23 @@ fn test_successful_rustc(env: &Env, args: &TestArg) -> Result<(), String> {
11221120
remove_files_callback("tests/failing-ui-tests.txt", "ui"),
11231121
false,
11241122
"ui",
1123+
false,
11251124
)?;
11261125
test_rustc_inner(
11271126
env,
11281127
args,
11291128
remove_files_callback("tests/failing-run-make-tests.txt", "run-make"),
11301129
false,
11311130
"run-make",
1131+
false,
11321132
)?;
11331133
test_rustc_inner(
11341134
env,
11351135
args,
11361136
remove_files_callback("tests/failing-run-make-tests.txt", "run-make-cargo"),
11371137
false,
11381138
"run-make-cargo",
1139+
false,
11391140
)
11401141
}
11411142

@@ -1146,6 +1147,7 @@ fn test_failing_ui_pattern_tests(env: &Env, args: &TestArg) -> Result<(), String
11461147
remove_files_callback("tests/failing-ice-tests.txt", "ui"),
11471148
true,
11481149
"ui",
1150+
false,
11491151
)
11501152
}
11511153

tests/failing-ui-tests.txt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
tests/ui/allocator/no_std-alloc-error-handler-custom.rs
2-
tests/ui/allocator/no_std-alloc-error-handler-default.rs
31
tests/ui/asm/may_unwind.rs
42
tests/ui/asm/x86_64/may_unwind.rs
53
tests/ui/drop/dynamic-drop-async.rs
@@ -17,7 +15,6 @@ tests/ui/panic-runtime/link-to-abort.rs
1715
tests/ui/parser/unclosed-delimiter-in-dep.rs
1816
tests/ui/consts/missing_span_in_backtrace.rs
1917
tests/ui/drop/dynamic-drop.rs
20-
tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.rs
2118
tests/ui/simd/issue-17170.rs
2219
tests/ui/simd/issue-39720.rs
2320
tests/ui/drop/panic-during-drop-14875.rs
@@ -31,11 +28,9 @@ tests/ui/coroutine/resume-after-return.rs
3128
tests/ui/simd/masked-load-store.rs
3229
tests/ui/simd/repr_packed.rs
3330
tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs
34-
tests/ui/consts/try-operator.rs
3531
tests/ui/coroutine/unwind-abort-mix.rs
3632
tests/ui/consts/issue-miri-1910.rs
3733
tests/ui/consts/const_cmp_type_id.rs
38-
tests/ui/consts/issue-73976-monomorphic.rs
3934
tests/ui/consts/issue-94675.rs
4035
tests/ui/traits/const-traits/const-drop-fail.rs
4136
tests/ui/runtime/on-broken-pipe/child-processes.rs
@@ -53,7 +48,6 @@ tests/ui/sanitizer/cfi/virtual-auto.rs
5348
tests/ui/sanitizer/cfi/sized-associated-ty.rs
5449
tests/ui/sanitizer/cfi/can-reveal-opaques.rs
5550
tests/ui/sanitizer/kcfi-mangling.rs
56-
tests/ui/statics/const_generics.rs
5751
tests/ui/backtrace/dylib-dep.rs
5852
tests/ui/delegation/fn-header.rs
5953
tests/ui/consts/const-eval/parse_ints.rs
@@ -74,13 +68,7 @@ tests/ui/codegen/equal-pointers-unequal/strict-provenance/zero.rs
7468
tests/ui/simd/simd-bitmask-notpow2.rs
7569
tests/ui/codegen/StackColoring-not-blowup-stack-issue-40883.rs
7670
tests/ui/numbers-arithmetic/u128-as-f32.rs
77-
tests/ui/lto/all-crates.rs
78-
tests/ui/uninhabited/uninhabited-transparent-return-abi.rs
79-
tests/ui/coroutine/panic-drops-resume.rs
80-
tests/ui/coroutine/panic-drops.rs
81-
tests/ui/coroutine/panic-safe.rs
8271
tests/ui/process/nofile-limit.rs
83-
tests/ui/simd/intrinsic/generic-arithmetic-pass.rs
8472
tests/ui/linking/no-gc-encapsulation-symbols.rs
8573
tests/ui/panics/unwind-force-no-unwind-tables.rs
8674
tests/ui/attributes/fn-align-dyn.rs

0 commit comments

Comments
 (0)