add exclude to config.toml
This commit is contained in:
@@ -446,6 +446,10 @@
|
|||||||
# a specific version.
|
# a specific version.
|
||||||
#ccache = false
|
#ccache = false
|
||||||
|
|
||||||
|
# List of paths to exclude from the build and test processes.
|
||||||
|
# For example, exclude = ["tests/ui", "src/tools/tidy"].
|
||||||
|
#exclude = []
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# General install configuration options
|
# General install configuration options
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|||||||
@@ -959,6 +959,7 @@ define_config! {
|
|||||||
jobs: Option<u32> = "jobs",
|
jobs: Option<u32> = "jobs",
|
||||||
compiletest_diff_tool: Option<String> = "compiletest-diff-tool",
|
compiletest_diff_tool: Option<String> = "compiletest-diff-tool",
|
||||||
ccache: Option<StringOrBool> = "ccache",
|
ccache: Option<StringOrBool> = "ccache",
|
||||||
|
exclude: Option<Vec<PathBuf>> = "exclude",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1397,22 +1398,6 @@ impl Config {
|
|||||||
"flags.exclude" = ?flags.exclude
|
"flags.exclude" = ?flags.exclude
|
||||||
);
|
);
|
||||||
|
|
||||||
config.skip = flags
|
|
||||||
.skip
|
|
||||||
.into_iter()
|
|
||||||
.chain(flags.exclude)
|
|
||||||
.map(|p| {
|
|
||||||
// Never return top-level path here as it would break `--skip`
|
|
||||||
// logic on rustc's internal test framework which is utilized
|
|
||||||
// by compiletest.
|
|
||||||
if cfg!(windows) {
|
|
||||||
PathBuf::from(p.to_str().unwrap().replace('/', "\\"))
|
|
||||||
} else {
|
|
||||||
p
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.collect();
|
|
||||||
|
|
||||||
#[cfg(feature = "tracing")]
|
#[cfg(feature = "tracing")]
|
||||||
span!(
|
span!(
|
||||||
target: "CONFIG_HANDLING",
|
target: "CONFIG_HANDLING",
|
||||||
@@ -1658,8 +1643,29 @@ impl Config {
|
|||||||
jobs,
|
jobs,
|
||||||
compiletest_diff_tool,
|
compiletest_diff_tool,
|
||||||
mut ccache,
|
mut ccache,
|
||||||
|
exclude,
|
||||||
} = toml.build.unwrap_or_default();
|
} = toml.build.unwrap_or_default();
|
||||||
|
|
||||||
|
let mut paths: Vec<PathBuf> = flags.skip.into_iter().chain(flags.exclude).collect();
|
||||||
|
|
||||||
|
if let Some(exclude) = exclude {
|
||||||
|
paths.extend(exclude);
|
||||||
|
}
|
||||||
|
|
||||||
|
config.skip = paths
|
||||||
|
.into_iter()
|
||||||
|
.map(|p| {
|
||||||
|
// Never return top-level path here as it would break `--skip`
|
||||||
|
// logic on rustc's internal test framework which is utilized
|
||||||
|
// by compiletest.
|
||||||
|
if cfg!(windows) {
|
||||||
|
PathBuf::from(p.to_str().unwrap().replace('/', "\\"))
|
||||||
|
} else {
|
||||||
|
p
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
|
|
||||||
config.jobs = Some(threads_from_config(flags.jobs.unwrap_or(jobs.unwrap_or(0))));
|
config.jobs = Some(threads_from_config(flags.jobs.unwrap_or(jobs.unwrap_or(0))));
|
||||||
|
|
||||||
if let Some(file_build) = build {
|
if let Some(file_build) = build {
|
||||||
|
|||||||
Reference in New Issue
Block a user