From d9b29fcd9dba60f224ca3475036e719b4e7cb798 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 29 May 2020 16:12:50 +1000 Subject: [PATCH] Preserve PATH and LD_LIBRARY_PATH when calling make When ./run.sh is invoked, it acts as a wrapper around `env - TESTS="" make -e check` to preserve the ability to build files defined only in the `check` target. Unfortunately, cleaning the full environment had a side-effect of some tests failing due to missing binaries and libraries. We now preserve the two most important variables - PATH and LD_LIBRARY_PATH. --- bin/tests/system/run.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tests/system/run.sh.in b/bin/tests/system/run.sh.in index 069ccad0ab..29b55e7ea9 100644 --- a/bin/tests/system/run.sh.in +++ b/bin/tests/system/run.sh.in @@ -67,7 +67,7 @@ if ! $do_run; then if [ "$baseport" -eq 0 ]; then log_flags="$log_flags -p 5300" fi - env - TESTS="$*" TEST_SUITE_LOG=run.log LOG_DRIVER_FLAGS="--verbose yes --color-tests yes" LOG_FLAGS="$log_flags" make -e check + env - PATH="$PATH" ${LD_LIBRARY_PATH:+"LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"} TESTS="$*" TEST_SUITE_LOG=run.log LOG_DRIVER_FLAGS="--verbose yes --color-tests yes" LOG_FLAGS="$log_flags" make -e check exit $? fi