@@ -144,6 +144,8 @@ pub struct TestProps {
144144 pub normalize_stdout : Vec < ( String , String ) > ,
145145 pub normalize_stderr : Vec < ( String , String ) > ,
146146 pub failure_status : i32 ,
147+ // For UI tests, allows compiler to exit with arbitrary failure status
148+ pub dont_check_failure_status : bool ,
147149 // Whether or not `rustfix` should apply the `CodeSuggestion`s of this test and compile the
148150 // resulting Rust code.
149151 pub run_rustfix : bool ,
@@ -186,6 +188,7 @@ mod directives {
186188 pub const CHECK_TEST_LINE_NUMBERS_MATCH : & ' static str = "check-test-line-numbers-match" ;
187189 pub const IGNORE_PASS : & ' static str = "ignore-pass" ;
188190 pub const FAILURE_STATUS : & ' static str = "failure-status" ;
191+ pub const DONT_CHECK_FAILURE_STATUS : & ' static str = "dont-check-failure-status" ;
189192 pub const RUN_RUSTFIX : & ' static str = "run-rustfix" ;
190193 pub const RUSTFIX_ONLY_MACHINE_APPLICABLE : & ' static str = "rustfix-only-machine-applicable" ;
191194 pub const ASSEMBLY_OUTPUT : & ' static str = "assembly-output" ;
@@ -233,6 +236,7 @@ impl TestProps {
233236 normalize_stdout : vec ! [ ] ,
234237 normalize_stderr : vec ! [ ] ,
235238 failure_status : -1 ,
239+ dont_check_failure_status : false ,
236240 run_rustfix : false ,
237241 rustfix_only_machine_applicable : false ,
238242 assembly_output : None ,
@@ -395,6 +399,12 @@ impl TestProps {
395399 self . failure_status = code;
396400 }
397401
402+ config. set_name_directive (
403+ ln,
404+ DONT_CHECK_FAILURE_STATUS ,
405+ & mut self . dont_check_failure_status ,
406+ ) ;
407+
398408 config. set_name_directive ( ln, RUN_RUSTFIX , & mut self . run_rustfix ) ;
399409 config. set_name_directive (
400410 ln,
0 commit comments