summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-15 23:52:06 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-15 23:52:06 +0200
commite4cfb2d3169b9bf3adfe58b1cd666a525962d142 (patch)
treed915ff66c0406fc0251d634c3efd0036cf9bfc1d
parent8170956b6875cc4826087d06c2573f42bed60a98 (diff)
downloadsamba-e4cfb2d3169b9bf3adfe58b1cd666a525962d142.tar.gz
samba-e4cfb2d3169b9bf3adfe58b1cd666a525962d142.tar.bz2
samba-e4cfb2d3169b9bf3adfe58b1cd666a525962d142.zip
Deal with commands not even starting.
(This used to be commit 0f789e6779eca38d93b968a0ffbbb8559ce483f1)
-rwxr-xr-xsource4/selftest/selftest.pl16
1 files changed, 10 insertions, 6 deletions
diff --git a/source4/selftest/selftest.pl b/source4/selftest/selftest.pl
index 39a1b5a450..53bfcb12f2 100755
--- a/source4/selftest/selftest.pl
+++ b/source4/selftest/selftest.pl
@@ -238,7 +238,13 @@ sub run_testsuite($$$$$$)
$msg_ops->start_test([], $name);
- open(RESULT, "$cmd 2>&1|");
+ unless (open(RESULT, "$cmd 2>&1|")) {
+ $msg_ops->end_test([], $name, "error", 1, "Unable to run $cmd: $!");
+ $statistics->{SUITES_FAIL}++;
+ $statistics->{TESTS_ERROR}++;
+ return 0;
+ }
+
my $expected_ret = parse_results(
$msg_ops, $statistics, *RESULT, \&expecting_failure, [$name]);
@@ -251,16 +257,14 @@ sub run_testsuite($$$$$$)
$ret = 0 unless $ret == 1;
if ($ret == 1) {
- $msg_ops->end_test([], $name, "success", $expected_ret != $ret, undef);
+ $msg_ops->end_test([], $name, "success", $expected_ret != $ret, undef);
} else {
- $msg_ops->end_test([], $name, "failure", $expected_ret != $ret,
- "Returned $ret");
+ $msg_ops->end_test([], $name, "failure", $expected_ret != $ret, "Returned $ret");
}
cleanup_pcap($pcap_file, $expected_ret, $ret);
- if (not $opt_socket_wrapper_keep_pcap and
- defined($pcap_file)) {
+ if (not $opt_socket_wrapper_keep_pcap and defined($pcap_file)) {
$msg_ops->output_msg("PCAP FILE: $pcap_file\n");
}