Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mir-opt diff tests for 64/32 bit targets doesn't render as diff in github #75746

Closed
oli-obk opened this issue Aug 20, 2020 · 4 comments · Fixed by #76854
Closed

mir-opt diff tests for 64/32 bit targets doesn't render as diff in github #75746

oli-obk opened this issue Aug 20, 2020 · 4 comments · Fixed by #76854
Labels
A-mir-opt Area: MIR optimizations E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Aug 20, 2020

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

expected_file = format!("{}{}", test_name, bit_width);
and
expected_file = format!("{}{}", test_name, bit_width);
to insert the bitsize before the .diff or .mir respectively.

After you've run --bless for both 32 bit and 64 bit, you also need to change

glob(&format!("{}/{}.*.mir{}", test_dir.display(), test_crate, bit_width)).unwrap()
and
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

@oli-obk oli-obk added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-mir-opt Area: MIR optimizations labels Aug 20, 2020
@mati865

This comment has been minimized.

@oli-obk

This comment has been minimized.

@mati865

This comment has been minimized.

aDotInTheVoid added a commit to aDotInTheVoid/rust that referenced this issue Sep 17, 2020
@aDotInTheVoid
Copy link
Member

I'm working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mir-opt Area: MIR optimizations E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants