selftest: Refactor duplicated code to set ENV vars
authorTim Beale <timbeale@catalyst.net.nz>
Mon, 20 May 2019 23:27:45 +0000 (11:27 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 24 May 2019 03:19:17 +0000 (03:19 +0000)
commita60e59735c20f8e342fa1b00ae5715f1673f22be
tree9a3ccd74a34e6657989e44e60b1bfe84900ec34d
parentd2f54775d3fe5e3ef6d00121ac7ab382dd58ddcd
selftest: Refactor duplicated code to set ENV vars

Whenever we started a process, we basically used the same code to setup
the ENV variables.

The s4 ENVNAME may now be slightly different in the child process that
runs samba (i.e. '$testenv.samba'), but that ENV var did not appeared to
be used much.

I'm not sure if the current difference in $skip_resolv_wrapper logic for
nmbd was deliberate or accidental, but I've preserved the logic for now.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/target/Samba.pm
selftest/target/Samba3.pm
selftest/target/Samba4.pm