@@ -959,6 +959,7 @@ define_config! {
959959 jobs: Option <u32 > = "jobs" ,
960960 compiletest_diff_tool: Option <String > = "compiletest-diff-tool" ,
961961 ccache: Option <StringOrBool > = "ccache" ,
962+ exclude: Option <Vec <PathBuf >> = "exclude" ,
962963 }
963964}
964965
@@ -1397,22 +1398,6 @@ impl Config {
13971398 "flags.exclude" = ?flags. exclude
13981399 ) ;
13991400
1400- config. skip = flags
1401- . skip
1402- . into_iter ( )
1403- . chain ( flags. exclude )
1404- . map ( |p| {
1405- // Never return top-level path here as it would break `--skip`
1406- // logic on rustc's internal test framework which is utilized
1407- // by compiletest.
1408- if cfg ! ( windows) {
1409- PathBuf :: from ( p. to_str ( ) . unwrap ( ) . replace ( '/' , "\\ " ) )
1410- } else {
1411- p
1412- }
1413- } )
1414- . collect ( ) ;
1415-
14161401 #[ cfg( feature = "tracing" ) ]
14171402 span ! (
14181403 target: "CONFIG_HANDLING" ,
@@ -1658,8 +1643,29 @@ impl Config {
16581643 jobs,
16591644 compiletest_diff_tool,
16601645 mut ccache,
1646+ exclude,
16611647 } = toml. build . unwrap_or_default ( ) ;
16621648
1649+ let mut paths: Vec < PathBuf > = flags. skip . into_iter ( ) . chain ( flags. exclude ) . collect ( ) ;
1650+
1651+ if let Some ( exclude) = exclude {
1652+ paths. extend ( exclude) ;
1653+ }
1654+
1655+ config. skip = paths
1656+ . into_iter ( )
1657+ . map ( |p| {
1658+ // Never return top-level path here as it would break `--skip`
1659+ // logic on rustc's internal test framework which is utilized
1660+ // by compiletest.
1661+ if cfg ! ( windows) {
1662+ PathBuf :: from ( p. to_str ( ) . unwrap ( ) . replace ( '/' , "\\ " ) )
1663+ } else {
1664+ p
1665+ }
1666+ } )
1667+ . collect ( ) ;
1668+
16631669 config. jobs = Some ( threads_from_config ( flags. jobs . unwrap_or ( jobs. unwrap_or ( 0 ) ) ) ) ;
16641670
16651671 if let Some ( file_build) = build {
0 commit comments