1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-30 06:50:24 +03:00

selftest: Add TESTENV_DIR "env" variable

We store the testenv directory path for the 'ctx' hashmap, but not for
the testenv-vars hashmap (and that can be really annoying sometimes).
Add it into the second hashmap that selftest actually keeps track of.
Currently it's only stored in the hashmap, not actually exported as an
environment variable (but we could easily do that if a test-case need
this info).

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Tim Beale 2019-03-14 17:38:22 +13:00 committed by Andrew Bartlett
parent 5635a7ce2f
commit c9e6251382
2 changed files with 3 additions and 1 deletions

View File

@ -2387,6 +2387,7 @@ force_user:x:$gid_force_user:
$ret{SMBD_TEST_LOG} = "$prefix/smbd_test.log";
$ret{SMBD_TEST_LOG_POS} = 0;
$ret{SERVERCONFFILE} = $conffile;
$ret{TESTENV_DIR} = $prefix_abs;
$ret{CONFIGURATION} ="-s $conffile";
$ret{LOCK_DIR} = $lockdir;
$ret{SERVER} = $server;

View File

@ -376,8 +376,8 @@ sub setup_dns_hub_internal($$$)
$env->{SERVER_IPV6} = Samba::get_ipv6_addr($hostname);
$env->{SOCKET_WRAPPER_DEFAULT_IFACE} = Samba::get_interface($hostname);
$env->{DNS_HUB_LOG} = "$prefix_abs/dns_hub.log";
$env->{RESOLV_CONF} = "$prefix_abs/resolv.conf";
$env->{TESTENV_DIR} = $prefix_abs;
open(RESOLV_CONF, ">$env->{RESOLV_CONF}");
print RESOLV_CONF "nameserver $env->{SERVER_IP}\n";
@ -916,6 +916,7 @@ nogroup:x:65534:nobody
PRIVATEDIR => $ctx->{privatedir},
BINDDNSDIR => $ctx->{binddnsdir},
SERVERCONFFILE => $ctx->{smb_conf},
TESTENV_DIR => $ctx->{prefix_abs},
CONFIGURATION => $configuration,
SOCKET_WRAPPER_DEFAULT_IFACE => $ctx->{swiface},
NSS_WRAPPER_PASSWD => $ctx->{nsswrap_passwd},