Skip to content

Commit 43a3a4c

Browse files
committed
ci: always set RUSTC_TEST_GIT_HASH
To always run `tests/run-make/version-verbose-commit-hash` in test jobs.
1 parent 6d29862 commit 43a3a4c

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/ci/citool/src/jobs.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,15 @@ fn calculate_jobs(
349349
}
350350
}
351351

352+
// Special env var to unconditionally enable the
353+
// `tests/run-make/version-verbose-commit-hash` test under CI environments. This is
354+
// specifically to bypass bootstrap to guard against bugs in bootstrap's git hash
355+
// availability logic.
356+
env.insert(
357+
"RUSTC_TEST_GIT_HASH".to_string(),
358+
serde_json::value::Value::Number(1.into()),
359+
);
360+
352361
GithubActionsJob {
353362
name: job.name,
354363
full_name,

src/ci/citool/src/main.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ fn run_workflow_locally(db: JobDatabase, job_type: JobType, name: String) -> any
121121
(key.clone(), value)
122122
}));
123123

124+
// Special env var to unconditionally enable the
125+
// `tests/run-make/version-verbose-commit-hash` test under CI environments. This is
126+
// specifically to bypass bootstrap to guard against bugs in bootstrap's git hash
127+
// availability logic.
128+
custom_env.insert("RUSTC_TEST_GIT_HASH".to_string(), "1".to_string());
129+
124130
init_submodule_if_needed("src/llvm-project/")?;
125131

126132
let mut cmd = Command::new(Path::new(DOCKER_DIRECTORY).join("run.sh"));

0 commit comments

Comments
 (0)