Skip to content

Commit cd56913

Browse files
authored
Rollup merge of #133813 - clubby789:ui-pass-note, r=jieyouxu
compiletest: explain that UI tests are expected not to compile by default ``` error: ui test compiled successfully! ``` is not a very useful message for someone new to the test suite, so change the wording and add a note to explain
2 parents fd182ca + ab38efe commit cd56913

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/tools/compiletest/src/runtest.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,13 @@ impl<'test> TestCx<'test> {
350350
}
351351
} else {
352352
if proc_res.status.success() {
353-
self.fatal_proc_rec(
354-
&format!("{} test compiled successfully!", self.config.mode)[..],
355-
proc_res,
356-
);
353+
{
354+
self.error(&format!("{} test did not emit an error", self.config.mode));
355+
if self.config.mode == crate::common::Mode::Ui {
356+
println!("note: by default, ui tests are expected not to compile");
357+
}
358+
proc_res.fatal(None, || ());
359+
};
357360
}
358361

359362
if !self.props.dont_check_failure_status {

0 commit comments

Comments
 (0)