mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-17 01:13:11 +00:00
Take revision into account in src/test/ui incremental tests
This commit is contained in:
parent
e5e4eef02d
commit
f38bf5399d
@ -617,6 +617,6 @@ pub fn output_base_name(config: &Config, testpaths: &TestPaths, revision: Option
|
|||||||
|
|
||||||
/// Absolute path to the directory to use for incremental compilation. Example:
|
/// Absolute path to the directory to use for incremental compilation. Example:
|
||||||
/// /path/to/build/host-triple/test/ui/relative/testname.mode/testname.inc
|
/// /path/to/build/host-triple/test/ui/relative/testname.mode/testname.inc
|
||||||
pub fn incremental_dir(config: &Config, testpaths: &TestPaths) -> PathBuf {
|
pub fn incremental_dir(config: &Config, testpaths: &TestPaths, revision: Option<&str>) -> PathBuf {
|
||||||
output_base_name(config, testpaths, None).with_extension("inc")
|
output_base_name(config, testpaths, revision).with_extension("inc")
|
||||||
}
|
}
|
||||||
|
@ -117,8 +117,12 @@ pub fn run(config: Config, testpaths: &TestPaths, revision: Option<&str>) {
|
|||||||
}
|
}
|
||||||
debug!("running {:?}", testpaths.file.display());
|
debug!("running {:?}", testpaths.file.display());
|
||||||
let mut props = TestProps::from_file(&testpaths.file, revision, &config);
|
let mut props = TestProps::from_file(&testpaths.file, revision, &config);
|
||||||
|
|
||||||
|
// For non-incremental (i.e. regular UI) tests, the incremental directory
|
||||||
|
// takes into account the revision name, since the revisions are independent
|
||||||
|
// of each other and can race.
|
||||||
if props.incremental {
|
if props.incremental {
|
||||||
props.incremental_dir = Some(incremental_dir(&config, testpaths));
|
props.incremental_dir = Some(incremental_dir(&config, testpaths, revision));
|
||||||
}
|
}
|
||||||
|
|
||||||
let cx = TestCx { config: &config, props: &props, testpaths, revision };
|
let cx = TestCx { config: &config, props: &props, testpaths, revision };
|
||||||
|
Loading…
Reference in New Issue
Block a user