git.samba.org
/
vlendec
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
680a2fb
)
selftest: Check exit code when listing tests.
author
Jelmer Vernooij
<jelmer@samba.org>
Thu, 9 Dec 2010 15:48:24 +0000
(16:48 +0100)
committer
Jelmer Vernooij
<jelmer@samba.org>
Fri, 10 Dec 2010 02:04:06 +0000
(
03:04
+0100)
selftest/selftest.pl
patch
|
blob
|
history
diff --git
a/selftest/selftest.pl
b/selftest/selftest.pl
index d8640e0d1ad39d53dc38462990c3c7227520c17e..213954cfbf98df0fc50dae72b6e2225ccba89dae 100755
(executable)
--- a/
selftest/selftest.pl
+++ b/
selftest/selftest.pl
@@
-959,6
+959,17
@@
$envvarstr
$cmd =~ s/\$LISTOPT/--list/;
system($cmd);
+
+ if ($? == -1) {
+ die("Unable to run $cmd: $!");
+ } elsif ($? & 127) {
+ die(snprintf("%s died with signal %d, %s coredump\n", $cmd, ($? & 127), ($? & 128) ? 'with' : 'without'));
+ }
+
+ my $exitcode = $? >> 8;
+ if ($exitcode != 0) {
+ die("$cmd exited with exit code $exitcode");
+ }
}
} else {
foreach (@todo) {