File tree 1 file changed +25
-1
lines changed
src/bootstrap/src/core/config
1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -1320,7 +1320,31 @@ 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
+ if !config. src . join ( & top_level_path) . exists ( ) {
1338
+ eprintln ! ( "WARNING: '{}' does not exist." , top_level_path. display( ) ) ;
1339
+ }
1340
+
1341
+ // Never return top-level path here as it would break `--skip`
1342
+ // logic on rustc's internal test framework which is utilized
1343
+ // by compiletest.
1344
+ p
1345
+ } )
1346
+ . collect ( ) ;
1347
+
1324
1348
config. include_default_paths = flags. include_default_paths ;
1325
1349
config. rustc_error_format = flags. rustc_error_format ;
1326
1350
config. json_output = flags. json_output ;
You can’t perform that action at this time.
0 commit comments