about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOrion Gonzalez <ardi@ardis.dev>2024-10-04 10:54:34 +0200
committerOrion Gonzalez <ardi@ardis.dev>2024-10-22 19:11:44 +0200
commitc8de61b50de7ca755b704c0314ff3a119be01ae6 (patch)
treef406562df280bab60a73445acbf3b2d4b4856007
parent37ffb94093828676d88178063c8930ea83a29386 (diff)
downloadrust-c8de61b50de7ca755b704c0314ff3a119be01ae6.tar.gz
rust-c8de61b50de7ca755b704c0314ff3a119be01ae6.zip
s/display-diff-tool/compiletest-diff-tool/
-rw-r--r--config.example.toml2
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs4
-rw-r--r--src/bootstrap/src/core/config/config.rs10
-rw-r--r--src/tools/compiletest/src/common.rs1
-rw-r--r--src/tools/compiletest/src/lib.rs4
5 files changed, 11 insertions, 10 deletions
diff --git a/config.example.toml b/config.example.toml
index b155e4731b0..77efdb6d392 100644
--- a/config.example.toml
+++ b/config.example.toml
@@ -420,7 +420,7 @@
 #jobs = 0
 
 # 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
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index c6c40b0f7f7..f671b0dcfe6 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -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() {
             cmd.arg("--only-modified");
         }
-        if let Some(display_diff_tool) = &builder.config.display_diff_tool {
-            cmd.arg("--display-diff-tool").arg(display_diff_tool);
+        if let Some(compiletest_diff_tool) = &builder.config.compiletest_diff_tool {
+            cmd.arg("--compiletest-diff-tool").arg(compiletest_diff_tool);
         }
 
         let mut flags = if is_rustdoc { Vec::new() } else { vec!["-Crpath".to_string()] };
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
index ba2ec8181f9..ec3a0a6de84 100644
--- a/src/bootstrap/src/core/config/config.rs
+++ b/src/bootstrap/src/core/config/config.rs
@@ -369,8 +369,8 @@ pub struct Config {
     /// `paths=["foo", "bar"]`.
     pub paths: Vec<PathBuf>,
 
-    /// What custom diff tool to use for displaying compiletest tests.
-    pub display_diff_tool: Option<String>,
+    /// Command for visual diff display, e.g. `diff-tool --color=always`.
+    pub compiletest_diff_tool: Option<String>,
 }
 
 #[derive(Clone, Debug, Default)]
@@ -895,7 +895,7 @@ define_config! {
         android_ndk: Option<PathBuf> = "android-ndk",
         optimized_compiler_builtins: Option<bool> = "optimized-compiler-builtins",
         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,
             optimized_compiler_builtins,
             jobs,
-            display_diff_tool,
+            compiletest_diff_tool,
         } = toml.build.unwrap_or_default();
 
         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.optimized_compiler_builtins =
             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();
         // See https://github.com/rust-lang/compiler-team/issues/326
diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs
index 5e50e227ded..5070f016d3c 100644
--- a/src/tools/compiletest/src/common.rs
+++ b/src/tools/compiletest/src/common.rs
@@ -388,6 +388,7 @@ pub struct Config {
     /// Used by the "needs-profiler-runtime" directive in test files.
     pub profiler_runtime: bool,
 
+    /// Command for visual diff display, e.g. `diff-tool --color=always`.
     pub diff_command: Option<String>,
 }
 
diff --git a/src/tools/compiletest/src/lib.rs b/src/tools/compiletest/src/lib.rs
index a008410e34b..0f514db42bf 100644
--- a/src/tools/compiletest/src/lib.rs
+++ b/src/tools/compiletest/src/lib.rs
@@ -178,7 +178,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
         )
         .optopt(
             "",
-            "display-diff-tool",
+            "compiletest-diff-tool",
             "What custom diff tool to use for displaying compiletest tests.",
             "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(),
 
         profiler_runtime: matches.opt_present("profiler-runtime"),
-        diff_command: matches.opt_str("display-diff-tool"),
+        diff_command: matches.opt_str("compiletest-diff-tool"),
     }
 }