Skip to content

Commit 735776d

Browse files
committed
Fix --bless for mir-opt 32/64 bit file
1 parent 3c7593e commit 735776d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/tools/compiletest/src/runtest.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -3156,12 +3156,12 @@ impl<'test> TestCx<'test> {
31563156

31573157
if self.config.bless {
31583158
for e in
3159-
glob(&format!("{}/{}.*.mir{}", test_dir.display(), test_crate, bit_width)).unwrap()
3159+
glob(&format!("{}/{}.*{}.mir", test_dir.display(), test_crate, bit_width)).unwrap()
31603160
{
31613161
std::fs::remove_file(e.unwrap()).unwrap();
31623162
}
31633163
for e in
3164-
glob(&format!("{}/{}.*.diff{}", test_dir.display(), test_crate, bit_width)).unwrap()
3164+
glob(&format!("{}/{}.*{}.diff", test_dir.display(), test_crate, bit_width)).unwrap()
31653165
{
31663166
std::fs::remove_file(e.unwrap()).unwrap();
31673167
}
@@ -3199,7 +3199,8 @@ impl<'test> TestCx<'test> {
31993199
from_file = format!("{}.{}.mir", test_name, first_pass);
32003200
to_file = Some(second_file);
32013201
} else {
3202-
expected_file = format!("{}{}.mir", test_name.trim_end_matches(".mir"), bit_width);
3202+
expected_file =
3203+
format!("{}{}.mir", test_name.trim_end_matches(".mir"), bit_width);
32033204
from_file = test_name.to_string();
32043205
assert!(
32053206
test_names.next().is_none(),

0 commit comments

Comments
 (0)