Skip to content

Commit 25888a7

Browse files
authored
Unrolled build for rust-lang#131764
Rollup merge of rust-lang#131764 - Zalathar:double-dir, r=jieyouxu Fix unnecessary nesting in run-make test output directories Run-make tests were using `output_base_name` to determine their output directory, which results in a redundant subdirectory (e.g. `$build/test/run-make/<foo>/<foo>/`) because that method is intended to produce the name of an individual file. The previous attempt to fix this double-nesting tried adding a special case in `output_base_dir`, which had the side-effect of breaking up-to-date checking for run-make tests, and had to be reverted in rust-lang#131681. The fix is simply to call `output_base_dir` directory, which gives the desired directory without any redundant part. r? jieyouxu
2 parents d829780 + 4cf0475 commit 25888a7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Diff for: 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
}

Diff for: 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)