#96777 was necessary because a test used both -Zsave-analysis and run-pass. That generated an untracked save-analysis-temp file in the root directory. That behavior is not great - we shouldn't do that even if the test is marked run-pass. We can avoid it by passing --out-dir config.build_base in compiletest:
|
match output_file { |
|
TargetLocation::ThisFile(path) => { |
|
rustc.arg("-o").arg(path); |
|
} |
|
TargetLocation::ThisDirectory(path) => { |
|
if is_rustdoc { |
|
// `rustdoc` uses `-o` for the output directory. |
|
rustc.arg("-o").arg(path); |
|
} else { |
|
rustc.arg("--out-dir").arg(path); |
|
} |
|
} |
|
} |
We should also investigate why this wasn't caught by CI - it makes the source directory read only, which should have prevented this being merged.
@rustbot label +E-easy +A-testsuite +E-mentor
#96777 was necessary because a test used both -Zsave-analysis and run-pass. That generated an untracked
save-analysis-tempfile in the root directory. That behavior is not great - we shouldn't do that even if the test is marked run-pass. We can avoid it by passing--out-dir config.build_basein compiletest:rust/src/tools/compiletest/src/runtest.rs
Lines 1895 to 1907 in fee75fb
We should also investigate why this wasn't caught by CI - it makes the source directory read only, which should have prevented this being merged.
@rustbot label +E-easy +A-testsuite +E-mentor