File tree 1 file changed +27
-1
lines changed
src/bootstrap/src/core/config
1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -1320,7 +1320,33 @@ impl Config {
1320
1320
1321
1321
// Set flags.
1322
1322
config. paths = std:: mem:: take ( & mut flags. paths ) ;
1323
- config. skip = flags. skip . into_iter ( ) . chain ( flags. exclude ) . collect ( ) ;
1323
+ config. skip = flags
1324
+ . skip
1325
+ . into_iter ( )
1326
+ . chain ( flags. exclude )
1327
+ . map ( |p| {
1328
+ let p = if cfg ! ( windows) {
1329
+ PathBuf :: from ( p. to_str ( ) . unwrap ( ) . replace ( '/' , "\\ " ) )
1330
+ } else {
1331
+ p
1332
+ } ;
1333
+
1334
+ // Jump to top-level project path to support passing paths
1335
+ // from sub directories.
1336
+ let top_level_path = config. src . join ( & p) ;
1337
+ assert ! (
1338
+ config. src. join( & top_level_path) . exists( ) ,
1339
+ "{} does not exist." ,
1340
+ top_level_path. display( )
1341
+ ) ;
1342
+
1343
+ // Never return top-level path here as it would break `--skip`
1344
+ // logic on rustc's internal test framework which is utilized
1345
+ // by compiletest.
1346
+ p
1347
+ } )
1348
+ . collect ( ) ;
1349
+
1324
1350
config. include_default_paths = flags. include_default_paths ;
1325
1351
config. rustc_error_format = flags. rustc_error_format ;
1326
1352
config. json_output = flags. json_output ;
You can’t perform that action at this time.
0 commit comments