diff --git a/tests/common/util.rs b/tests/common/util.rs index d6352b993f..ab7beb9745 100644 --- a/tests/common/util.rs +++ b/tests/common/util.rs @@ -1657,6 +1657,11 @@ impl UCommand { } } + // Forward the LLVM_PROFILE_FILE variable to the call, for coverage purposes. + if let Some(ld_preload) = env::var_os("LLVM_PROFILE_FILE") { + command.env("LLVM_PROFILE_FILE", ld_preload); + } + command .envs(DEFAULT_ENV) .envs(self.env_vars.iter().cloned());