@@ -150,6 +150,8 @@ pub struct TestProps {
150
150
pub normalize_stdout : Vec < ( String , String ) > ,
151
151
pub normalize_stderr : Vec < ( String , String ) > ,
152
152
pub failure_status : i32 ,
153
+ // For UI tests, allows compiler to exit with arbitrary failure status
154
+ pub dont_check_failure_status : bool ,
153
155
// Whether or not `rustfix` should apply the `CodeSuggestion`s of this test and compile the
154
156
// resulting Rust code.
155
157
pub run_rustfix : bool ,
@@ -192,6 +194,7 @@ mod directives {
192
194
pub const CHECK_TEST_LINE_NUMBERS_MATCH : & ' static str = "check-test-line-numbers-match" ;
193
195
pub const IGNORE_PASS : & ' static str = "ignore-pass" ;
194
196
pub const FAILURE_STATUS : & ' static str = "failure-status" ;
197
+ pub const DONT_CHECK_FAILURE_STATUS : & ' static str = "dont-check-failure-status" ;
195
198
pub const RUN_RUSTFIX : & ' static str = "run-rustfix" ;
196
199
pub const RUSTFIX_ONLY_MACHINE_APPLICABLE : & ' static str = "rustfix-only-machine-applicable" ;
197
200
pub const ASSEMBLY_OUTPUT : & ' static str = "assembly-output" ;
@@ -239,6 +242,7 @@ impl TestProps {
239
242
normalize_stdout : vec ! [ ] ,
240
243
normalize_stderr : vec ! [ ] ,
241
244
failure_status : -1 ,
245
+ dont_check_failure_status : false ,
242
246
run_rustfix : false ,
243
247
rustfix_only_machine_applicable : false ,
244
248
assembly_output : None ,
@@ -401,6 +405,12 @@ impl TestProps {
401
405
self . failure_status = code;
402
406
}
403
407
408
+ config. set_name_directive (
409
+ ln,
410
+ DONT_CHECK_FAILURE_STATUS ,
411
+ & mut self . dont_check_failure_status ,
412
+ ) ;
413
+
404
414
config. set_name_directive ( ln, RUN_RUSTFIX , & mut self . run_rustfix ) ;
405
415
config. set_name_directive (
406
416
ln,
0 commit comments