compiletest/rmake: avoid double test directory for rmake.rs tests
This is important for other tests that have various things like modes, revisions and the like. These features are not supported in run-make tests, so we don't need the double layering.
This commit is contained in:
parent
c863525374
commit
2c867d0b5f
1 changed files with 8 additions and 2 deletions
|
@ -760,8 +760,14 @@ pub fn output_testname_unique(
|
|||
/// test/revision should reside. Example:
|
||||
/// /path/to/build/host-triple/test/ui/relative/testname.revision.mode/
|
||||
pub fn output_base_dir(config: &Config, testpaths: &TestPaths, revision: Option<&str>) -> PathBuf {
|
||||
output_relative_path(config, &testpaths.relative_dir)
|
||||
.join(output_testname_unique(config, testpaths, revision))
|
||||
// In run-make tests, constructing a relative path + unique testname causes a double layering
|
||||
// since revisions are not supported, causing unnecessary nesting.
|
||||
if config.mode == Mode::RunMake {
|
||||
output_relative_path(config, &testpaths.relative_dir)
|
||||
} else {
|
||||
output_relative_path(config, &testpaths.relative_dir)
|
||||
.join(output_testname_unique(config, testpaths, revision))
|
||||
}
|
||||
}
|
||||
|
||||
/// Absolute path to the base filename used as output for the given
|
||||
|
|
Loading…
Add table
Reference in a new issue