diff options
| author | Tom Tromey <tom@tromey.com> | 2018-09-25 12:27:09 -0600 |
|---|---|---|
| committer | Tom Tromey <tom@tromey.com> | 2018-09-25 12:27:09 -0600 |
| commit | e6ea19d7bd17cf7252d6af90781665d5e87ea156 (patch) | |
| tree | 9cac8b894f52b82b4feadb70f73e11dec04a9da3 | |
| parent | ae366637fedf6f34185e54fc7b2d725b1a458ff6 (diff) | |
| download | rust-e6ea19d7bd17cf7252d6af90781665d5e87ea156.tar.gz rust-e6ea19d7bd17cf7252d6af90781665d5e87ea156.zip | |
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.
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 401dec7b184..f1a275b05c9 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -224,6 +224,19 @@ pub fn run(config: Config, testpaths: &TestPaths, revision: Option<&str>) { pub fn compute_stamp_hash(config: &Config) -> String { let mut hash = DefaultHasher::new(); config.stage_id.hash(&mut hash); + match config.mode { + DebugInfoGdb => match config.gdb { + None => env::var_os("PATH").hash(&mut hash), + Some(ref s) if s.is_empty() => env::var_os("PATH").hash(&mut hash), + Some(ref s) => s.hash(&mut hash), + }, + DebugInfoLldb => { + env::var_os("PATH").hash(&mut hash); + env::var_os("PYTHONPATH").hash(&mut hash); + }, + + _ => {}, + }; format!("{:x}", hash.finish()) } |
