selftest: terminate selftest if we can't setup the environment
authorAndrew Tridgell <tridge@samba.org>
Tue, 19 Oct 2010 03:49:17 +0000 (14:49 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 19 Oct 2010 03:53:39 +0000 (14:53 +1100)
selftest/selftest.pl

index 7431bed8ed8ad3eda71ef7f6df53c55ee8d7abf2..eabee7a7664e7f5485df58b1f7ec6ed9c6482948 100755 (executable)
@@ -253,7 +253,7 @@ sub run_testsuite($$$$$)
        if ($? == -1) {
                Subunit::progress_pop();
                Subunit::end_testsuite($name, "error", "Unable to run $cmd: $!");
-               return 0;
+               exit(1);
        } elsif ($? & 127) {
                Subunit::end_testsuite($name, "error",
                        sprintf("%s died with signal %d, %s coredump\n", $cmd, ($? & 127),  ($? & 128) ? 'with' : 'without'));
@@ -953,7 +953,8 @@ $envvarstr
                if (not defined($envvars)) {
                        Subunit::start_testsuite($name);
                        Subunit::end_testsuite($name, "error",
-                               "unable to set up environment $envname");
+                               "unable to set up environment $envname - exiting");
+                       exit(1);
                        next;
                }