Skip to content

Commit 762fc05

Browse files
authored
Rollup merge of rust-lang#54567 - tromey:paths-in-stamp-hashes, r=Mark-Simulacrum
Include path in stamp hash for debuginfo tests The debuginfo tests are exposed to the environment in a couple of ways: the path to the gdb executable matters, as does the Python path used when loading lldb. This patch incorporates these paths into the hash that is written to the stamp file, so that changing the path will cause the tests to be re-run.
2 parents 6460631 + e6ea19d commit 762fc05

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Diff for: src/tools/compiletest/src/runtest.rs

+13
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,19 @@ pub fn run(config: Config, testpaths: &TestPaths, revision: Option<&str>) {
224224
pub fn compute_stamp_hash(config: &Config) -> String {
225225
let mut hash = DefaultHasher::new();
226226
config.stage_id.hash(&mut hash);
227+
match config.mode {
228+
DebugInfoGdb => match config.gdb {
229+
None => env::var_os("PATH").hash(&mut hash),
230+
Some(ref s) if s.is_empty() => env::var_os("PATH").hash(&mut hash),
231+
Some(ref s) => s.hash(&mut hash),
232+
},
233+
DebugInfoLldb => {
234+
env::var_os("PATH").hash(&mut hash);
235+
env::var_os("PYTHONPATH").hash(&mut hash);
236+
},
237+
238+
_ => {},
239+
};
227240
format!("{:x}", hash.finish())
228241
}
229242

0 commit comments

Comments
 (0)