@@ -58,6 +58,7 @@ pub enum Subcommand {
58
58
/// Whether to automatically update stderr/stdout files
59
59
bless : bool ,
60
60
compare_mode : Option < String > ,
61
+ pass : Option < String > ,
61
62
test_args : Vec < String > ,
62
63
rustc_args : Vec < String > ,
63
64
fail_fast : bool ,
@@ -199,6 +200,12 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`"
199
200
"mode describing what file the actual ui output will be compared to" ,
200
201
"COMPARE MODE" ,
201
202
) ;
203
+ opts. optopt (
204
+ "" ,
205
+ "pass" ,
206
+ "force {check,build,run}-pass tests to this mode." ,
207
+ "check | build | run"
208
+ ) ;
202
209
opts. optflag (
203
210
"" ,
204
211
"rustfix-coverage" ,
@@ -401,6 +408,7 @@ Arguments:
401
408
paths,
402
409
bless : matches. opt_present ( "bless" ) ,
403
410
compare_mode : matches. opt_str ( "compare-mode" ) ,
411
+ pass : matches. opt_str ( "pass" ) ,
404
412
test_args : matches. opt_strs ( "test-args" ) ,
405
413
rustc_args : matches. opt_strs ( "rustc-args" ) ,
406
414
fail_fast : !matches. opt_present ( "no-fail-fast" ) ,
@@ -524,6 +532,15 @@ impl Subcommand {
524
532
_ => None ,
525
533
}
526
534
}
535
+
536
+ pub fn pass ( & self ) -> Option < & str > {
537
+ match * self {
538
+ Subcommand :: Test {
539
+ ref pass, ..
540
+ } => pass. as_ref ( ) . map ( |s| & s[ ..] ) ,
541
+ _ => None ,
542
+ }
543
+ }
527
544
}
528
545
529
546
fn split ( s : & [ String ] ) -> Vec < String > {
0 commit comments