systems/test/run.sh to pass through VIRTUAL_ENV and PERL5LIB
Description
Have tests/system use required Python (dnspython) and PERL modules (Digest::HMAC and Net::DNS) from user directories, avoid using privileges.
Request
Have run.sh pass Python virtualenv variable VIRTUAL_ENV
and PERL's
PERL5LIB
from user environment to make (gmake).
--- run.sh.in.orig 2022-06-16 10:52:39.000000000 +0100
+++ run.sh.in 2022-06-16 11:00:23.000000000 +0100
@@ -90,6 +90,8 @@
LOG_FLAGS="$log_flags" \
TEST_LARGE_MAP="${TEST_LARGE_MAP}" \
CI_ENABLE_ALL_TESTS="${CI_ENABLE_ALL_TESTS}" \
+ ${VIRTUAL_ENV:+"VIRTUAL_ENV=${VIRTUAL_ENV}"} \
+ ${PERL5LIB:+"PERL5LIB=${PERL5LIB}"} \
make -e check
exit $?
fi
Note: The pythonenv must be setup to use the same version of python as the test uses, for example /usr/bin/python.
Links / references
Python's virtual environments are well documented.
Perl's use of PERL5LIB is not so well documented,
- Search www.perl.COM for PERL5LLIB.
- A good summary can be found on Stackoverlflow
Edited by Petr Špaček