From 25da05a74fe5ab1cee2773eac2011e2775169189 Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Mon, 2 Jun 2025 11:21:47 -0400 Subject: [PATCH] Pass `LLVM_*` variables to `--runas` command To allow variables like `LLVM_PROFILE_FILE`, which is used for code coverage profiling, to be passed through. --- pgrx-tests/src/framework.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pgrx-tests/src/framework.rs b/pgrx-tests/src/framework.rs index 80e5ff578e..f8df69b76e 100644 --- a/pgrx-tests/src/framework.rs +++ b/pgrx-tests/src/framework.rs @@ -584,9 +584,11 @@ fn start_pg(loglines: LogLines) -> eyre::Result { #[inline] fn accept_envar(var: &str) -> bool { // taken from https://doc.rust-lang.org/cargo/reference/environment-variables.html + // and https://releases.llvm.org/12.0.1/tools/clang/docs/SourceBasedCodeCoverage.html var.starts_with("CARGO") || var.starts_with("RUST") || var.starts_with("DEP_") + || var.starts_with("LLVM_") || ["OUT_DIR", "TARGET", "HOST", "NUM_JOBS", "OPT_LEVEL", "DEBUG", "PROFILE"] .contains(&var) }