From 73238301f452a801fc66b63eaa8fb463bfbac0d1 Mon Sep 17 00:00:00 2001 From: Orion Gonzalez Date: Thu, 3 Oct 2024 03:15:32 +0200 Subject: [PATCH] add an option for a custom differ --- src/tools/compiletest/src/common.rs | 2 ++ src/tools/compiletest/src/lib.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs index ff059940f7c..5e50e227ded 100644 --- a/src/tools/compiletest/src/common.rs +++ b/src/tools/compiletest/src/common.rs @@ -387,6 +387,8 @@ pub struct Config { /// True if the profiler runtime is enabled for this target. /// Used by the "needs-profiler-runtime" directive in test files. pub profiler_runtime: bool, + + pub diff_command: Option, } impl Config { diff --git a/src/tools/compiletest/src/lib.rs b/src/tools/compiletest/src/lib.rs index 7d6ede9bcda..5046eea63e2 100644 --- a/src/tools/compiletest/src/lib.rs +++ b/src/tools/compiletest/src/lib.rs @@ -364,6 +364,7 @@ fn make_absolute(path: PathBuf) -> PathBuf { git_merge_commit_email: matches.opt_str("git-merge-commit-email").unwrap(), profiler_runtime: matches.opt_present("profiler-runtime"), + diff_command: env::var("COMPILETEST_DIFF_TOOL").ok(), } }