diff options
Diffstat (limited to 'source4/selftest')
-rwxr-xr-x | source4/selftest/selftest.pl | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/source4/selftest/selftest.pl b/source4/selftest/selftest.pl index 3270364a91..5854a94b8d 100755 --- a/source4/selftest/selftest.pl +++ b/source4/selftest/selftest.pl @@ -407,14 +407,19 @@ my $tls_enabled = not $opt_quick; $ENV{TLS_ENABLED} = ($tls_enabled?"yes":"no"); $ENV{LDB_MODULES_PATH} = "$old_pwd/bin/modules/ldb"; $ENV{LD_SAMBA_MODULE_PATH} = "$old_pwd/bin/modules"; -if (defined($ENV{PKG_CONFIG_PATH})) { - $ENV{PKG_CONFIG_PATH} = "$old_pwd/bin/pkgconfig:$ENV{PKG_CONFIG_PATH}"; -} else { - $ENV{PKG_CONFIG_PATH} = "$old_pwd/bin/pkgconfig"; +sub prefix_pathvar($$) +{ + my ($name, $newpath) = @_; + if (defined($ENV{$name})) { + $ENV{$name} = "$newpath:$ENV{$name}"; + } else { + $ENV{$name} = $newpath; + } } +prefix_pathvar("PKG_CONFIG_PATH", "$old_pwd/bin/pkgconfig"); # Required for smbscript: -$ENV{PATH} = "$old_pwd/bin:$old_pwd:$ENV{PATH}"; -$ENV{PYTHONPATH} = "$builddir/bin/python:$ENV{PYTHONPATH}"; +prefix_pathvar("PATH", "$old_pwd/bin"); +prefix_pathvar("PYTHONPATH", "$old_pwd/bin/python"); if ($opt_socket_wrapper_keep_pcap) { # Socket wrapper keep pcap implies socket wrapper pcap |