Skip to content

Commit

Permalink
Rollup merge of #131681 - Zalathar:fix-run-make-stamp, r=jieyouxu
Browse files Browse the repository at this point in the history
Fix up-to-date checking for run-make tests

This special case in `output_base_dir` had the unfortunate side-effect of causing all run-make tests to share the same `stamp` file. So as soon as any one of them succeeded, all of the failed tests would be incorrectly considered up-to-date and would no longer run in subsequent test invocations.

Fixes #129971.

r? jieyouxu
  • Loading branch information
matthiaskrgr authored Oct 15, 2024
2 parents bd649b4 + c6e1fbf commit 258c177
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions src/tools/compiletest/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -759,14 +759,8 @@ 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 {
// 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))
}
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
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down

0 comments on commit 258c177

Please sign in to comment.