Skip to content

Commit 5d9b63c

Browse files
authored
Rollup merge of rust-lang#45917 - ollie27:compiletest_stamp, r=alexcrichton
compiletest: Fix a couple of test re-run issues * Re-run rustdoc tests if rustdoc or htmldocck.py was updated. * Put stamp files in the correct subdirectories to avoid clashes when the file names match but the subdirectory doesn't.
2 parents e349b18 + ec15924 commit 5d9b63c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/tools/compiletest/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ fn stamp(config: &Config, testpaths: &TestPaths) -> PathBuf {
493493
config.stage_id);
494494
config.build_base.canonicalize()
495495
.unwrap_or_else(|_| config.build_base.clone())
496+
.join(&testpaths.relative_dir)
496497
.join(stamp_name)
497498
}
498499

@@ -524,6 +525,10 @@ fn up_to_date(config: &Config, testpaths: &TestPaths, props: &EarlyProps) -> boo
524525
let lib = lib.unwrap();
525526
inputs.push(mtime(&lib.path()));
526527
}
528+
if let Some(ref rustdoc_path) = config.rustdoc_path {
529+
inputs.push(mtime(&rustdoc_path));
530+
inputs.push(mtime(&rust_src_dir.join("src/etc/htmldocck.py")));
531+
}
527532
inputs.iter().any(|input| *input > stamp)
528533
}
529534

0 commit comments

Comments
 (0)