-
Couldn't load subscription status.
- Fork 400
Run all pass-dep tests natively, too #3948
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
base: master
Are you sure you want to change the base?
Conversation
de41d01 to
1426114
Compare
lol oops, dependency building on linux does different stuff I guess |
|
Yeah we set that flag here Line 53 in 6e83c99
GC_STRESS is disabled on Windows since the runner is so slow.^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
I wonder if it'd be worth to first only land this for pass-dep, also to keep the diff smaller. Then we can iron out the kinks for the large number of pass tests in a next step.
| exit_code: 0, | ||
| output_conflict_handling: Some(|path, actual, errors, config| { | ||
| let path = path.with_file_name( | ||
| path.file_name().unwrap().to_str().unwrap().replace(".run.", "."), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does this .run. come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so you get foo.run.stderr that does not conflict with foo.stderr, which is for stderr during compilation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this removes .run.
Is this to make sure that the output of the "run" is compared with the normal reference file for Miri?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
| revision: &str, | ||
| ) -> bool { | ||
| for rev in comments.for_revision(revision) { | ||
| for arg in &rev.compile_flags { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we just strip everything that starts with -Zmiri?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is filtering out tests. Otherwise I need to add only-miri a lot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah... "strip" is a very confusing name then.
Hm, not sure how I feel about that. Feels a bit too implicit. This reaffirms my position that we should, at least in the first iteration, only do this for pass-dep tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what that changes. I would still have to do all the same changes in ui.rs
I will do that to reduce the scope of this PR and future unrelated PRs that may be affected, but the impl is just as complex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well the logic for implicitly making tests only-miri when they use these particular flag could be removed, I think?
| }); | ||
| config.program.envs.push(("MIRI_BE_RUSTC".into(), Some("host".into()))); | ||
|
|
||
| #[derive(Debug)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #[derive(Debug)] | |
| /// A ui_test filter that strips `-Zmiri` flags. | |
| #[derive(Debug)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the comment is wrong then. Please replace it by something that is correct :)
| c.current_dir(dir); | ||
| } | ||
| c.args( | ||
| cmd.get_args().filter(|arg| !arg.as_encoded_bytes().starts_with(b"-Zmiri-")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the arg filter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More comments would help :)
| config.comment_defaults.base().add_custom("run", Run { | ||
| exit_code: 0, | ||
| output_conflict_handling: Some(|path, actual, errors, config| { | ||
| let path = path.with_file_name( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| let path = path.with_file_name( | |
| // ui_test would compare the output with `test.run.stdout`, but we want to | |
| // compare with `test.stdout`, so adjust the filename. | |
| let path = path.with_file_name( |
At least I think that's what happens?
| if !config.host_matches_target() { | ||
| return Ok(()); | ||
| } | ||
| config.output_conflict_handling = ui_test::ignore_output_conflict; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| config.output_conflict_handling = ui_test::ignore_output_conflict; | |
| // This is about the output during compilation. We want to ignore that. | |
| // Above in `add_custom("run", ...)`, we set things up so that the output | |
| // from *running* the program is compared as it should. | |
| config.output_conflict_handling = ui_test::ignore_output_conflict; |
ad79e8f to
ca3fd79
Compare
|
|
||
| ui(Mode::Pass, "tests/pass", &target, WithoutDependencies, tmpdir.path())?; | ||
| ui(Mode::Pass, "tests/pass-dep", &target, WithDependencies, tmpdir.path())?; | ||
| ui(Mode::Pass { rustc: false }, "tests/pass", &target, WithoutDependencies, tmpdir.path())?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also adjust the eprintln in fn ui to add something like "on rustc" or so, so that one can see which way the tests are being run?
|
☔ The latest upstream changes (presumably #3950) made this pull request unmergeable. Please resolve the merge conflicts. |
|
☔ The latest upstream changes (possibly 887b498) made this pull request unmergeable. Please resolve the merge conflicts. |
fixes #3810