selftest: pass location of perl executable from waf to test-envs
authorUri Simchoni <uri@samba.org>
Thu, 21 Dec 2017 17:49:39 +0000 (19:49 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 22 Dec 2017 02:30:12 +0000 (03:30 +0100)
commitabcc95520102e40d836c60f389bc4fb6110223ec
tree816f9a0de139beebded8c57b0de4d9e8b8b2aa55
parentc4919d4d5f78aeb54a438b95d4eab2f082a8174e
selftest: pass location of perl executable from waf to test-envs

Many perl scripts in the codebase are executables with a
"/usr/bin/perl" shebang. Running them as executables is not
portable as some OS's have a different location for the perl
interpreter.

During the configuration process, waf finds the location of the perl
interpreter. Some or all  invocations of perl scripts from within
test environment setup code are actually "$PERL <script>",
but since PERL env var is typically not set, this amounts to the
unportable "<script>", which invokes /usr/bin/perl.

This patch exports the location of perl as found by the configuration
process to the test environment, causing "$PERL <script>" to be
"<correct place of perl interpreter> <script>".

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/wscript