@@ -58,6 +58,7 @@ pub enum Subcommand {
5858 /// Whether to automatically update stderr/stdout files
5959 bless : bool ,
6060 compare_mode : Option < String > ,
61+ pass : Option < String > ,
6162 test_args : Vec < String > ,
6263 rustc_args : Vec < String > ,
6364 fail_fast : bool ,
@@ -199,6 +200,12 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`"
199200 "mode describing what file the actual ui output will be compared to" ,
200201 "COMPARE MODE" ,
201202 ) ;
203+ opts. optopt (
204+ "" ,
205+ "pass" ,
206+ "force {check,build,run}-pass tests to this mode." ,
207+ "check | build | run"
208+ ) ;
202209 opts. optflag (
203210 "" ,
204211 "rustfix-coverage" ,
@@ -401,6 +408,7 @@ Arguments:
401408 paths,
402409 bless : matches. opt_present ( "bless" ) ,
403410 compare_mode : matches. opt_str ( "compare-mode" ) ,
411+ pass : matches. opt_str ( "pass" ) ,
404412 test_args : matches. opt_strs ( "test-args" ) ,
405413 rustc_args : matches. opt_strs ( "rustc-args" ) ,
406414 fail_fast : !matches. opt_present ( "no-fail-fast" ) ,
@@ -524,6 +532,15 @@ impl Subcommand {
524532 _ => None ,
525533 }
526534 }
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+ }
527544}
528545
529546fn split ( s : & [ String ] ) -> Vec < String > {
0 commit comments