Skip to content

Commit f0a811c

Browse files
committed
handle GitConfig for tools/compiletest
Signed-off-by: onur-ozkan <[email protected]>
1 parent 12998c2 commit f0a811c

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

src/bootstrap/src/core/build_steps/test.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2098,6 +2098,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
20982098
let git_config = builder.config.git_config();
20992099
cmd.arg("--git-repository").arg(git_config.git_repository);
21002100
cmd.arg("--nightly-branch").arg(git_config.nightly_branch);
2101+
cmd.arg("--git-merge-commit-email").arg(git_config.git_merge_commit_email);
21012102
cmd.force_coloring_in_ci();
21022103

21032104
#[cfg(feature = "build-metrics")]

src/tools/compiletest/src/common.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ pub struct Config {
384384
// Needed both to construct build_helper::git::GitConfig
385385
pub git_repository: String,
386386
pub nightly_branch: String,
387+
pub git_merge_commit_email: String,
387388

388389
/// True if the profiler runtime is enabled for this target.
389390
/// Used by the "needs-profiler-support" header in test files.
@@ -461,7 +462,11 @@ impl Config {
461462
}
462463

463464
pub fn git_config(&self) -> GitConfig<'_> {
464-
GitConfig { git_repository: &self.git_repository, nightly_branch: &self.nightly_branch }
465+
GitConfig {
466+
git_repository: &self.git_repository,
467+
nightly_branch: &self.nightly_branch,
468+
git_merge_commit_email: &self.git_merge_commit_email,
469+
}
465470
}
466471
}
467472

src/tools/compiletest/src/header/tests.rs

+1
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ impl ConfigBuilder {
148148
self.target.as_deref().unwrap_or("x86_64-unknown-linux-gnu"),
149149
"--git-repository=",
150150
"--nightly-branch=",
151+
"--git-merge-commit-email=",
151152
];
152153
let mut args: Vec<String> = args.iter().map(ToString::to_string).collect();
153154

src/tools/compiletest/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
346346

347347
git_repository: matches.opt_str("git-repository").unwrap(),
348348
nightly_branch: matches.opt_str("nightly-branch").unwrap(),
349+
git_merge_commit_email: matches.opt_str("git-merge-commit-email").unwrap(),
349350

350351
profiler_support: matches.opt_present("profiler-support"),
351352
}

0 commit comments

Comments
 (0)