]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Preserve PATH and LD_LIBRARY_PATH when calling make
authorMark Andrews <marka@isc.org>
Fri, 29 May 2020 06:12:50 +0000 (16:12 +1000)
committerOndřej Surý <ondrej@isc.org>
Thu, 4 Jun 2020 13:20:08 +0000 (15:20 +0200)
When ./run.sh <test> is invoked, it acts as a wrapper around
`env - TESTS="<test>" 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

index 069ccad0ab108cc985d99986f9beb0aced87e639..29b55e7ea9647fb20c012d6c894e6cd66191643d 100644 (file)
@@ -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