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

compiletest: explain that UI tests are expected not to compile by default #133813

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,13 @@ impl<'test> TestCx<'test> {
}
} else {
if proc_res.status.success() {
self.fatal_proc_rec(
&format!("{} test compiled successfully!", self.config.mode)[..],
proc_res,
);
{
self.error(&format!("{} test did not emit an error", self.config.mode));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark (for myself): improve this diagnostics when I get to untangling the runtest logic to make it so that test suites explicitly declare their intended default behavior so that the diagnostics here can say e.g. "expected to check-fail, but this didn't fail" or whatever.

if self.config.mode == crate::common::Mode::Ui {
println!("note: by default, ui tests are expected not to compile");
jieyouxu marked this conversation as resolved.
Show resolved Hide resolved
}
proc_res.fatal(None, || ());
};
}

if !self.props.dont_check_failure_status {
Expand Down
Loading