summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Hornsey <fred@hornsey.us>2019-08-20 17:05:32 -0500
committerFred Hornsey <fred@hornsey.us>2019-08-20 17:05:32 -0500
commitba5f278c1a407202299edb2c0900b41c0d624855 (patch)
treed3b93b07f1518ca4b3adecdd93f28a92611fad23
parent5ba5d502c8aa6528c6769c9896926c43020d7a6e (diff)
downloadATCD-ba5f278c1a407202299edb2c0900b41c0d624855.tar.gz
Fix auto_run_tests.pl for ace tests
-rwxr-xr-xACE/bin/auto_run_tests.pl26
1 files changed, 14 insertions, 12 deletions
diff --git a/ACE/bin/auto_run_tests.pl b/ACE/bin/auto_run_tests.pl
index 3e9b5887677..176ff4c34bb 100755
--- a/ACE/bin/auto_run_tests.pl
+++ b/ACE/bin/auto_run_tests.pl
@@ -35,20 +35,22 @@ sub run_command ($$) {
my $command = shift;
my $print_error = shift;
my $result = 0;
- if (system($command) and $print_error) {
- my $error_message;
+ if (system($command)) {
$result = $? >> 8;
- if ($? == -1) {
- $error_message = "failed to run: $!";
+ if ($print_error) {
+ my $error_message;
+ if ($? == -1) {
+ $error_message = "failed to run: $!";
+ }
+ elsif ($? & 127) {
+ $error_message = sprintf("exited on signal %d", ($? & 127));
+ $error_message .= " and created coredump" if ($? & 128);
+ }
+ else {
+ $error_message = sprintf ("returned with status %d", $result);
+ }
+ print "Error: $test $error_message\n";
}
- elsif ($? & 127) {
- $error_message = sprintf("exited on signal %d", ($? & 127));
- $error_message .= " and created coredump" if ($? & 128);
- }
- else {
- $error_message = sprintf ("returned with status %d", $result);
- }
- print "Error: $test $error_message\n";
}
return $result;
}