@@ -64,6 +64,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
64
64
. reqopt ( "" , "src-base" , "directory to scan for test files" , "PATH" )
65
65
. reqopt ( "" , "build-base" , "directory to deposit test outputs" , "PATH" )
66
66
. reqopt ( "" , "sysroot-base" , "directory containing the compiler sysroot" , "PATH" )
67
+ . reqopt ( "" , "stage" , "stage number under test" , "N" )
67
68
. reqopt ( "" , "stage-id" , "the target-stage identifier" , "stageN-TARGET" )
68
69
. reqopt (
69
70
"" ,
@@ -294,6 +295,11 @@ pub fn parse_config(args: Vec<String>) -> Config {
294
295
panic ! ( "`--nocapture` is deprecated; please use `--no-capture`" ) ;
295
296
}
296
297
298
+ let stage = match matches. opt_str ( "stage" ) {
299
+ Some ( stage) => stage. parse :: < u32 > ( ) . expect ( "expected `--stage` to be an unsigned integer" ) ,
300
+ None => panic ! ( "`--stage` is required" ) ,
301
+ } ;
302
+
297
303
Config {
298
304
bless : matches. opt_present ( "bless" ) ,
299
305
compile_lib_path : make_absolute ( opt_path ( matches, "compile-lib-path" ) ) ,
@@ -311,7 +317,10 @@ pub fn parse_config(args: Vec<String>) -> Config {
311
317
src_base,
312
318
build_base : opt_path ( matches, "build-base" ) ,
313
319
sysroot_base : opt_path ( matches, "sysroot-base" ) ,
320
+
321
+ stage,
314
322
stage_id : matches. opt_str ( "stage-id" ) . unwrap ( ) ,
323
+
315
324
mode,
316
325
suite : matches. opt_str ( "suite" ) . unwrap ( ) ,
317
326
debugger : matches. opt_str ( "debugger" ) . map ( |debugger| {
@@ -415,6 +424,7 @@ pub fn log_config(config: &Config) {
415
424
logv ( c, format ! ( "rustdoc_path: {:?}" , config. rustdoc_path) ) ;
416
425
logv ( c, format ! ( "src_base: {:?}" , config. src_base. display( ) ) ) ;
417
426
logv ( c, format ! ( "build_base: {:?}" , config. build_base. display( ) ) ) ;
427
+ logv ( c, format ! ( "stage: {}" , config. stage) ) ;
418
428
logv ( c, format ! ( "stage_id: {}" , config. stage_id) ) ;
419
429
logv ( c, format ! ( "mode: {}" , config. mode) ) ;
420
430
logv ( c, format ! ( "run_ignored: {}" , config. run_ignored) ) ;
0 commit comments