From 76a4ea5e2a7b23f0fdca5c7740e4fbb5de195083 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Fri, 28 May 2021 18:42:00 +0200 Subject: [PATCH] Export ENV in .sh file generated by run-tests --- run-tests.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/run-tests.php b/run-tests.php index c5f1c02ad68..93186b6e083 100755 --- a/run-tests.php +++ b/run-tests.php @@ -2780,9 +2780,14 @@ COMMAND $cmd // write .sh if (strpos($log_format, 'S') !== false) { + $env_lines = []; + foreach ($env as $env_var => $env_val) { + $env_lines[] = "export $env_var=" . escapeshellarg($env_val); + } + $exported_environment = $env_lines ? "\n" . implode("\n", $env_lines) . "\n" : ""; $sh_script = <<