@@ -144,6 +144,8 @@ pub struct TestProps {
144
144
pub normalize_stdout : Vec < ( String , String ) > ,
145
145
pub normalize_stderr : Vec < ( String , String ) > ,
146
146
pub failure_status : i32 ,
147
+ // For UI tests, allows compiler to exit with arbitrary failure status
148
+ pub dont_check_failure_status : bool ,
147
149
// Whether or not `rustfix` should apply the `CodeSuggestion`s of this test and compile the
148
150
// resulting Rust code.
149
151
pub run_rustfix : bool ,
@@ -186,6 +188,7 @@ mod directives {
186
188
pub const CHECK_TEST_LINE_NUMBERS_MATCH : & ' static str = "check-test-line-numbers-match" ;
187
189
pub const IGNORE_PASS : & ' static str = "ignore-pass" ;
188
190
pub const FAILURE_STATUS : & ' static str = "failure-status" ;
191
+ pub const DONT_CHECK_FAILURE_STATUS : & ' static str = "dont-check-failure-status" ;
189
192
pub const RUN_RUSTFIX : & ' static str = "run-rustfix" ;
190
193
pub const RUSTFIX_ONLY_MACHINE_APPLICABLE : & ' static str = "rustfix-only-machine-applicable" ;
191
194
pub const ASSEMBLY_OUTPUT : & ' static str = "assembly-output" ;
@@ -233,6 +236,7 @@ impl TestProps {
233
236
normalize_stdout : vec ! [ ] ,
234
237
normalize_stderr : vec ! [ ] ,
235
238
failure_status : -1 ,
239
+ dont_check_failure_status : false ,
236
240
run_rustfix : false ,
237
241
rustfix_only_machine_applicable : false ,
238
242
assembly_output : None ,
@@ -395,6 +399,12 @@ impl TestProps {
395
399
self . failure_status = code;
396
400
}
397
401
402
+ config. set_name_directive (
403
+ ln,
404
+ DONT_CHECK_FAILURE_STATUS ,
405
+ & mut self . dont_check_failure_status ,
406
+ ) ;
407
+
398
408
config. set_name_directive ( ln, RUN_RUSTFIX , & mut self . run_rustfix ) ;
399
409
config. set_name_directive (
400
410
ln,
0 commit comments