Skip to content

Commit

Permalink
ui tests improvs
Browse files Browse the repository at this point in the history
  • Loading branch information
lordshashank committed Mar 24, 2024
1 parent 5272806 commit 245428f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions build_system/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -839,8 +839,7 @@ fn should_remove_test(file_path: &Path) -> Result<bool, String> {
"//@ run-fail",
"-Cllvm-args",
"//~",
"thread",
"//@ known-bug"
"thread"
]
.iter()
.any(|check| line.contains(check))
Expand Down Expand Up @@ -928,6 +927,7 @@ where
let nb_parts = args.nb_parts.unwrap_or(0);
if nb_parts > 0 {
let current_part = args.current_part.unwrap();
// FIXME: create a function "display_if_not_quiet" or something along the line.
println!(
"Splitting ui_test into {} parts (and running part {})",
nb_parts, current_part
Expand Down Expand Up @@ -1047,7 +1047,7 @@ fn prepare_files_callback_failing<'a>(
move |rust_path| {
let files = std::fs::read_to_string(file_path).unwrap_or_default();
let first_file_name = files.lines().next().unwrap_or("");
// If the first line ends with a `/`, we treat it as a directory.
// If the first line ends with a `/`, we treat all lines in the file as a directory.
if first_file_name.ends_with('/') {
// Treat as directory
// Removing all tests.
Expand Down Expand Up @@ -1110,7 +1110,7 @@ fn prepare_files_callback_success<'a>(
move |rust_path| {
let files = std::fs::read_to_string(file_path).unwrap_or_default();
let first_file_name = files.lines().next().unwrap_or("");
// If the first line ends with a `/`, we treat it as a directory.
// If the first line ends with a `/`, we treat all lines in the file as a directory.
if first_file_name.ends_with('/') {
if let Ok(files) = std::fs::read_to_string(file_path) {
for file in
Expand Down
6 changes: 5 additions & 1 deletion tests/failing-ui-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,8 @@ tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs
tests/ui/impl-trait/equality-in-canonical-query.rs
tests/ui/consts/issue-miri-1910.rs
tests/ui/mir/mir_heavy_promoted.rs

tests/ui/consts/const_cmp_type_id.rs
tests/ui/consts/issue-73976-monomorphic.rs
tests/ui/consts/issue-94675.rs
tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.r
tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs

0 comments on commit 245428f

Please sign in to comment.