diff options
author | Tim Beale <timbeale@catalyst.net.nz> | 2019-02-18 15:34:51 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-02-20 00:37:14 +0100 |
commit | bcd007532820a077320fe21f246c5ba0195e87d5 (patch) | |
tree | bc1d8091c69063bb479983f1fb1b51fb9266d5e5 /selftest/selftest.pl | |
parent | ec51bfca4e77e57d81c0a7ed8e1fecb83d8aecfc (diff) | |
download | samba-bcd007532820a077320fe21f246c5ba0195e87d5.tar.gz |
selftest: Abort if we fail to startup testenv with '--one' option
The --one selftest.pl option means abort when the first test fails.
However, when 'make test' fails to startup a testenv, it'll try to
continue and run other tests by default. When '--one' is used,
selftest.pl can just die() at that point.
Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'selftest/selftest.pl')
-rwxr-xr-x | selftest/selftest.pl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl index 9aea62a3d2a..ec44b89dac7 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -944,7 +944,11 @@ sub setup_env($$) $testenv_vars->{target} = $target; } if (not defined($testenv_vars)) { - warn("$opt_target can't start up known environment '$envname'"); + if ($opt_one) { + die("$opt_target can't start up known environment '$envname'"); + } else { + warn("$opt_target can't start up known environment '$envname'"); + } } } |