@@ -103,6 +103,7 @@ pub enum Subcommand {
103103 bless : bool ,
104104 compare_mode : Option < String > ,
105105 pass : Option < String > ,
106+ run : Option < String > ,
106107 test_args : Vec < String > ,
107108 rustc_args : Vec < String > ,
108109 fail_fast : bool ,
@@ -293,6 +294,12 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",
293294 "force {check,build,run}-pass tests to this mode." ,
294295 "check | build | run" ,
295296 ) ;
297+ opts. optopt (
298+ "" ,
299+ "run" ,
300+ "whether to execute run-* tests" ,
301+ "auto | always | never" ,
302+ ) ;
296303 opts. optflag (
297304 "" ,
298305 "rustfix-coverage" ,
@@ -556,6 +563,7 @@ Arguments:
556563 bless : matches. opt_present ( "bless" ) ,
557564 compare_mode : matches. opt_str ( "compare-mode" ) ,
558565 pass : matches. opt_str ( "pass" ) ,
566+ run : matches. opt_str ( "run" ) ,
559567 test_args : matches. opt_strs ( "test-args" ) ,
560568 rustc_args : matches. opt_strs ( "rustc-args" ) ,
561569 fail_fast : !matches. opt_present ( "no-fail-fast" ) ,
@@ -742,6 +750,13 @@ impl Subcommand {
742750 }
743751 }
744752
753+ pub fn run ( & self ) -> Option < & str > {
754+ match * self {
755+ Subcommand :: Test { ref run, .. } => run. as_ref ( ) . map ( |s| & s[ ..] ) ,
756+ _ => None ,
757+ }
758+ }
759+
745760 pub fn open ( & self ) -> bool {
746761 match * self {
747762 Subcommand :: Doc { open, .. } => open,
0 commit comments