Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unnecessary nesting in run-make test output directories #131764

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/tools/compiletest/src/runtest/run_make.rs
Original file line number Diff line number Diff line change
@@ -22,6 +22,10 @@ impl TestCx<'_> {
let src_root = self.config.src_base.parent().unwrap().parent().unwrap();
let src_root = cwd.join(&src_root);

// FIXME(Zalathar): This should probably be `output_base_dir` to avoid
// an unnecessary extra subdirectory, but since legacy Makefile tests
// are hopefully going away, it seems safer to leave this perilous code
// as-is until it can all be deleted.
let tmpdir = cwd.join(self.output_base_name());
if tmpdir.exists() {
self.aggressive_rm_rf(&tmpdir).unwrap();
@@ -213,7 +217,7 @@ impl TestCx<'_> {
// `rmake_out/` directory.
//
// This setup intentionally diverges from legacy Makefile run-make tests.
let base_dir = self.output_base_name();
let base_dir = self.output_base_dir();
if base_dir.exists() {
self.aggressive_rm_rf(&base_dir).unwrap();
}
2 changes: 1 addition & 1 deletion tests/run-make/README.md
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ The setup for the `rmake.rs` version is a 3-stage process:
structure within `build/<target>/test/run-make/`

```
<test-name>/<test-name>/
<test-name>/
rmake.exe # recipe binary
rmake_out/ # sources from test sources copied over
```