@@ -150,6 +150,8 @@ pub struct TestProps {
150150 pub normalize_stdout : Vec < ( String , String ) > ,
151151 pub normalize_stderr : Vec < ( String , String ) > ,
152152 pub failure_status : i32 ,
153+ // For UI tests, allows compiler to exit with arbitrary failure status
154+ pub dont_check_failure_status : bool ,
153155 // Whether or not `rustfix` should apply the `CodeSuggestion`s of this test and compile the
154156 // resulting Rust code.
155157 pub run_rustfix : bool ,
@@ -192,6 +194,7 @@ mod directives {
192194 pub const CHECK_TEST_LINE_NUMBERS_MATCH : & ' static str = "check-test-line-numbers-match" ;
193195 pub const IGNORE_PASS : & ' static str = "ignore-pass" ;
194196 pub const FAILURE_STATUS : & ' static str = "failure-status" ;
197+ pub const DONT_CHECK_FAILURE_STATUS : & ' static str = "dont-check-failure-status" ;
195198 pub const RUN_RUSTFIX : & ' static str = "run-rustfix" ;
196199 pub const RUSTFIX_ONLY_MACHINE_APPLICABLE : & ' static str = "rustfix-only-machine-applicable" ;
197200 pub const ASSEMBLY_OUTPUT : & ' static str = "assembly-output" ;
@@ -239,6 +242,7 @@ impl TestProps {
239242 normalize_stdout : vec ! [ ] ,
240243 normalize_stderr : vec ! [ ] ,
241244 failure_status : -1 ,
245+ dont_check_failure_status : false ,
242246 run_rustfix : false ,
243247 rustfix_only_machine_applicable : false ,
244248 assembly_output : None ,
@@ -401,6 +405,12 @@ impl TestProps {
401405 self . failure_status = code;
402406 }
403407
408+ config. set_name_directive (
409+ ln,
410+ DONT_CHECK_FAILURE_STATUS ,
411+ & mut self . dont_check_failure_status ,
412+ ) ;
413+
404414 config. set_name_directive ( ln, RUN_RUSTFIX , & mut self . run_rustfix ) ;
405415 config. set_name_directive (
406416 ln,
0 commit comments