s/display-diff-tool/compiletest-diff-tool/
This commit is contained in:
parent
37ffb94093
commit
c8de61b50d
5 changed files with 11 additions and 10 deletions
|
@ -420,7 +420,7 @@
|
||||||
#jobs = 0
|
#jobs = 0
|
||||||
|
|
||||||
# What custom diff tool to use for displaying compiletest tests.
|
# What custom diff tool to use for displaying compiletest tests.
|
||||||
#display-diff-tool = "difft --color=always --background=light --display=side-by-side"
|
#compiletest-diff-tool = "difft --color=always --background=light --display=side-by-side"
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# General install configuration options
|
# General install configuration options
|
||||||
|
|
|
@ -1834,8 +1834,8 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
|
||||||
if builder.config.cmd.only_modified() {
|
if builder.config.cmd.only_modified() {
|
||||||
cmd.arg("--only-modified");
|
cmd.arg("--only-modified");
|
||||||
}
|
}
|
||||||
if let Some(display_diff_tool) = &builder.config.display_diff_tool {
|
if let Some(compiletest_diff_tool) = &builder.config.compiletest_diff_tool {
|
||||||
cmd.arg("--display-diff-tool").arg(display_diff_tool);
|
cmd.arg("--compiletest-diff-tool").arg(compiletest_diff_tool);
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut flags = if is_rustdoc { Vec::new() } else { vec!["-Crpath".to_string()] };
|
let mut flags = if is_rustdoc { Vec::new() } else { vec!["-Crpath".to_string()] };
|
||||||
|
|
|
@ -369,8 +369,8 @@ pub struct Config {
|
||||||
/// `paths=["foo", "bar"]`.
|
/// `paths=["foo", "bar"]`.
|
||||||
pub paths: Vec<PathBuf>,
|
pub paths: Vec<PathBuf>,
|
||||||
|
|
||||||
/// What custom diff tool to use for displaying compiletest tests.
|
/// Command for visual diff display, e.g. `diff-tool --color=always`.
|
||||||
pub display_diff_tool: Option<String>,
|
pub compiletest_diff_tool: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default)]
|
#[derive(Clone, Debug, Default)]
|
||||||
|
@ -895,7 +895,7 @@ define_config! {
|
||||||
android_ndk: Option<PathBuf> = "android-ndk",
|
android_ndk: Option<PathBuf> = "android-ndk",
|
||||||
optimized_compiler_builtins: Option<bool> = "optimized-compiler-builtins",
|
optimized_compiler_builtins: Option<bool> = "optimized-compiler-builtins",
|
||||||
jobs: Option<u32> = "jobs",
|
jobs: Option<u32> = "jobs",
|
||||||
display_diff_tool: Option<String> = "display-diff-tool",
|
compiletest_diff_tool: Option<String> = "compiletest-diff-tool",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1516,7 +1516,7 @@ impl Config {
|
||||||
android_ndk,
|
android_ndk,
|
||||||
optimized_compiler_builtins,
|
optimized_compiler_builtins,
|
||||||
jobs,
|
jobs,
|
||||||
display_diff_tool,
|
compiletest_diff_tool,
|
||||||
} = toml.build.unwrap_or_default();
|
} = toml.build.unwrap_or_default();
|
||||||
|
|
||||||
config.jobs = Some(threads_from_config(flags.jobs.unwrap_or(jobs.unwrap_or(0))));
|
config.jobs = Some(threads_from_config(flags.jobs.unwrap_or(jobs.unwrap_or(0))));
|
||||||
|
@ -2163,7 +2163,7 @@ impl Config {
|
||||||
config.rust_debuginfo_level_tests = debuginfo_level_tests.unwrap_or(DebuginfoLevel::None);
|
config.rust_debuginfo_level_tests = debuginfo_level_tests.unwrap_or(DebuginfoLevel::None);
|
||||||
config.optimized_compiler_builtins =
|
config.optimized_compiler_builtins =
|
||||||
optimized_compiler_builtins.unwrap_or(config.channel != "dev");
|
optimized_compiler_builtins.unwrap_or(config.channel != "dev");
|
||||||
config.display_diff_tool = display_diff_tool;
|
config.compiletest_diff_tool = compiletest_diff_tool;
|
||||||
|
|
||||||
let download_rustc = config.download_rustc_commit.is_some();
|
let download_rustc = config.download_rustc_commit.is_some();
|
||||||
// See https://github.com/rust-lang/compiler-team/issues/326
|
// See https://github.com/rust-lang/compiler-team/issues/326
|
||||||
|
|
|
@ -388,6 +388,7 @@ pub struct Config {
|
||||||
/// Used by the "needs-profiler-runtime" directive in test files.
|
/// Used by the "needs-profiler-runtime" directive in test files.
|
||||||
pub profiler_runtime: bool,
|
pub profiler_runtime: bool,
|
||||||
|
|
||||||
|
/// Command for visual diff display, e.g. `diff-tool --color=always`.
|
||||||
pub diff_command: Option<String>,
|
pub diff_command: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
|
||||||
)
|
)
|
||||||
.optopt(
|
.optopt(
|
||||||
"",
|
"",
|
||||||
"display-diff-tool",
|
"compiletest-diff-tool",
|
||||||
"What custom diff tool to use for displaying compiletest tests.",
|
"What custom diff tool to use for displaying compiletest tests.",
|
||||||
"COMMAND",
|
"COMMAND",
|
||||||
);
|
);
|
||||||
|
@ -370,7 +370,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
|
||||||
git_merge_commit_email: matches.opt_str("git-merge-commit-email").unwrap(),
|
git_merge_commit_email: matches.opt_str("git-merge-commit-email").unwrap(),
|
||||||
|
|
||||||
profiler_runtime: matches.opt_present("profiler-runtime"),
|
profiler_runtime: matches.opt_present("profiler-runtime"),
|
||||||
diff_command: matches.opt_str("display-diff-tool"),
|
diff_command: matches.opt_str("compiletest-diff-tool"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue