Skip to content

Commit 4cf0475

Browse files
committed
Fix unnecessary nesting in run-make test output directories
1 parent e7c0d27 commit 4cf0475

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/tools/compiletest/src/runtest/run_make.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ impl TestCx<'_> {
2222
let src_root = self.config.src_base.parent().unwrap().parent().unwrap();
2323
let src_root = cwd.join(&src_root);
2424

25+
// FIXME(Zalathar): This should probably be `output_base_dir` to avoid
26+
// an unnecessary extra subdirectory, but since legacy Makefile tests
27+
// are hopefully going away, it seems safer to leave this perilous code
28+
// as-is until it can all be deleted.
2529
let tmpdir = cwd.join(self.output_base_name());
2630
if tmpdir.exists() {
2731
self.aggressive_rm_rf(&tmpdir).unwrap();
@@ -213,7 +217,7 @@ impl TestCx<'_> {
213217
// `rmake_out/` directory.
214218
//
215219
// This setup intentionally diverges from legacy Makefile run-make tests.
216-
let base_dir = self.output_base_name();
220+
let base_dir = self.output_base_dir();
217221
if base_dir.exists() {
218222
self.aggressive_rm_rf(&base_dir).unwrap();
219223
}

tests/run-make/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The setup for the `rmake.rs` version is a 3-stage process:
2929
structure within `build/<target>/test/run-make/`
3030

3131
```
32-
<test-name>/<test-name>/
32+
<test-name>/
3333
rmake.exe # recipe binary
3434
rmake_out/ # sources from test sources copied over
3535
```

0 commit comments

Comments
 (0)