- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.9k
 
Description
mir-opt tests have a diff mode where the changes of a specific optimization are shown as a .diff file which is rendered as a diff by most tools. For 32/64 bit tests we ended up adding a postfix to the file name (which comes after the .diff), and that breaks the tool support. We should change all these tests file-names so they end with .diff again.
We should change both
rust/src/tools/compiletest/src/runtest.rs
Line 3172 in 5fff382
| expected_file = format!("{}{}", test_name, bit_width); | 
rust/src/tools/compiletest/src/runtest.rs
Line 3190 in 5fff382
| expected_file = format!("{}{}", test_name, bit_width); | 
bitsize before the .diff or .mir respectively.
After you've run --bless for both 32 bit and 64 bit, you also need to change 
rust/src/tools/compiletest/src/runtest.rs
Line 3147 in 5fff382
| glob(&format!("{}/{}.*.mir{}", test_dir.display(), test_crate, bit_width)).unwrap() | 
rust/src/tools/compiletest/src/runtest.rs
Line 3152 in 5fff382
| glob(&format!("{}/{}.*.diff{}", test_dir.display(), test_crate, bit_width)).unwrap() | 
Do not do the last step before having run --bless, otherwise you'll have to figure out what files to rename and do it manually. This way you get --bless to do it for you.
cc @rust-lang/wg-mir-opt