summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2016-09-19 14:54:50 +0200
committerChristophe Lyon <christophe.lyon@linaro.org>2016-09-19 14:54:50 +0200
commitbcbd748e2a6c33ff81812ce13b118adf3da81d72 (patch)
tree19fe392e42fc642cc8403b475211c70d2be5d372
parent8d2798ef5261b21fb8e0a66860f5bc6ee22e3ce8 (diff)
Handle DejaGnu ERROR messages.
Instead of silently ignoring them! Change-Id: Ic48af21b4d60fa0ad166c973168a67d6ddae5ea8
-rwxr-xr-xcompare_dg_tests.pl24
-rw-r--r--testsuite/expected-1-2.txt7
-rw-r--r--testsuite/sum-1.txt2
-rw-r--r--testsuite/sum-2.txt2
4 files changed, 29 insertions, 6 deletions
diff --git a/compare_dg_tests.pl b/compare_dg_tests.pl
index b8b34f8..0d8d349 100755
--- a/compare_dg_tests.pl
+++ b/compare_dg_tests.pl
@@ -89,6 +89,9 @@ my $UNRESOLVED_UNTESTED = "UNRESOLVED now UNTESTED [UNRES=>UNTES]";
my $UNRESOLVED_DISAPPEARS = "UNRESOLVED disappears [UNRES=> ]";
my $UNRESOLVED_APPEARS = "UNRESOLVED appears [ =>UNRES]";
+my $ERROR_DISAPPEARS = "ERROR disappears [ERROR=> ]";
+my $ERROR_APPEARS = "ERROR appears [ =>ERROR]";
+
my $UNHANDLED_CASES = "Unhandled cases [ ..??.. ]";
my $UNSTABLE_CASES = "Unstable cases, ignored [~RANDOM ]";
@@ -163,6 +166,9 @@ my @handler_list = (
{was=>"UNRESOLVED", is=>"NO_EXIST", cat=>$UNRESOLVED_DISAPPEARS},
{was=>"NO_EXIST", is=>"UNRESOLVED", cat=>$UNRESOLVED_APPEARS},
+ {was=>"ERROR", is=>"NO_EXIST", cat=>$ERROR_DISAPPEARS},
+ {was=>"NO_EXIST", is=>"ERROR", cat=>$ERROR_APPEARS},
+
# {was=>"NO_EXIST", is=>"NO_EXIST", handler=>\&handle_not_yet_supported}
);
@@ -227,9 +233,9 @@ exit $final_result;
sub empty_result()
{
- my %empty_result;# = {PASS=>0, FAIL=>0, XPASS=>0, XFAIL=>0, UNSUPPORTED=>0, UNTESTED=>0, UNRESOLVED=>0};
+ my %empty_result;# = {PASS=>0, FAIL=>0, XPASS=>0, XFAIL=>0, UNSUPPORTED=>0, UNTESTED=>0, UNRESOLVED=>0, ERROR=>0};
$empty_result{PASS}=$empty_result{FAIL}=$empty_result{XPASS}=$empty_result{XFAIL}=0;
- $empty_result{UNSUPPORTED}=$empty_result{UNTESTED}=$empty_result{UNRESOLVED}=$empty_result{NO_EXIST}=0;
+ $empty_result{UNSUPPORTED}=$empty_result{UNTESTED}=$empty_result{UNRESOLVED}=$empty_result{NO_EXIST}=$empty_result{ERROR}=0;
return \%empty_result;
}
sub I_am_interactive {
@@ -259,7 +265,7 @@ sub read_sum($)
open SUMFILE, $sum_file or die $!;
while (<SUMFILE>)
{
- if (m/^(PASS|XPASS|FAIL|XFAIL|UNSUPPORTED|UNTESTED|UNRESOLVED): (.*)/)
+ if (m/^(PASS|XPASS|FAIL|XFAIL|UNSUPPORTED|UNTESTED|UNRESOLVED|ERROR): (.*)/)
{
my ($diag,$tc) = ($1,$2);
my %tcresult;
@@ -424,6 +430,9 @@ sub compare_results($$)
@{$res->{$UNRESOLVED_DISAPPEARS}} = ();
@{$res->{$UNRESOLVED_APPEARS}} = ();
+ @{$res->{$ERROR_DISAPPEARS}} = ();
+ @{$res->{$ERROR_APPEARS}} = ();
+
@{$res->{$UNHANDLED_CASES}} = ();
@{$res->{$UNSTABLE_CASES}} = ();
@@ -550,6 +559,7 @@ sub print_compare_results_summary($$)
printf " +------------------------------------------+---------+---------+\n";
printf " | %-40s | %7d | %7d |\n", "Passes [PASS]", $ref->{PASS}, $res->{PASS};
printf " | %-40s | %7d | %7d |\n", "Unexpected fails [FAIL]", $ref->{FAIL}, $res->{FAIL};
+ printf " | %-40s | %7d | %7d |\n", "Errors [ERROR]", $ref->{ERROR}, $res->{ERROR};
printf " | %-40s | %7d | %7d |\n", "Unexpected passes [XPASS]", $ref->{XPASS}, $res->{XPASS};
printf " | %-40s | %7d | %7d |\n", "Expected fails [XFAIL]", $ref->{XFAIL}, $res->{XFAIL};
printf " | %-40s | %7d | %7d |\n", "Unresolved [UNRESOLVED]", $ref->{UNRESOLVED}, $res->{UNRESOLVED};
@@ -611,7 +621,8 @@ sub print_compare_results_summary($$)
+scalar(@{$res->{$UNTESTED_UNRESOLVED}})
+scalar(@{$res->{$UNRESOLVED_FAIL}})
+scalar(@{$res->{$UNRESOLVED_XPASS}})
- +scalar(@{$res->{$UNRESOLVED_APPEARS}});
+ +scalar(@{$res->{$UNRESOLVED_APPEARS}})
+ +scalar(@{$res->{$ERROR_APPEARS}});
$quiet_reg=1 if ($short and not $rtotal);
@@ -623,6 +634,7 @@ sub print_compare_results_summary($$)
printf " | %-40s | %7d |\n", $PASS_FAIL, scalar(@{$res->{$PASS_FAIL}}) if (scalar(@{$res->{$PASS_FAIL}}));
printf " | %-40s | %7d |\n", $PASS_UNRESOLVED, scalar(@{$res->{$PASS_UNRESOLVED}}) if (scalar(@{$res->{$PASS_UNRESOLVED}}));
printf " | %-40s | %7d |\n", $PASSED_NOW_TIMEOUTS, scalar(@{$res->{$PASSED_NOW_TIMEOUTS}}) if (scalar(@{$res->{$PASSED_NOW_TIMEOUTS}}));
+ printf " | %-40s | %7d |\n", $ERROR_APPEARS, scalar(@{$res->{$ERROR_APPEARS}}) if (scalar(@{$res->{$ERROR_APPEARS}}));
printf " | %-40s | %7d |\n", $XPASS_FAIL, scalar(@{$res->{$XPASS_FAIL}}) if (scalar(@{$res->{$XPASS_FAIL}}));
printf " | %-40s | %7d |\n", $XPASS_APPEARS, scalar(@{$res->{$XPASS_APPEARS}}) if (scalar(@{$res->{$XPASS_APPEARS}}));
printf " | %-40s | %7d |\n", $XPASS_UNRESOLVED, scalar(@{$res->{$XPASS_UNRESOLVED}}) if (scalar(@{$res->{$XPASS_UNRESOLVED}}));
@@ -651,6 +663,7 @@ sub print_compare_results_summary($$)
print_tclist($PASS_FAIL, @{$res->{$PASS_FAIL}});
print_tclist($PASS_UNRESOLVED, @{$res->{$PASS_UNRESOLVED}});
print_tclist($PASSED_NOW_TIMEOUTS, @{$res->{$PASSED_NOW_TIMEOUTS}});
+ print_tclist($ERROR_APPEARS, @{$res->{$ERROR_APPEARS}});
print_tclist($XPASS_FAIL, @{$res->{$XPASS_FAIL}});
print_tclist($XPASS_APPEARS, @{$res->{$XPASS_APPEARS}});
print_tclist($XPASS_UNRESOLVED, @{$res->{$XPASS_UNRESOLVED}});
@@ -712,6 +725,7 @@ sub print_compare_results_summary($$)
scalar(@{$res->{$UNRESOLVED_UNSUPPORTED}})+
scalar(@{$res->{$UNRESOLVED_UNTESTED}})+
scalar(@{$res->{$UNRESOLVED_DISAPPEARS}})+
+ scalar(@{$res->{$ERROR_DISAPPEARS}})+
scalar(@{$res->{$UNHANDLED_CASES}});
printf "$col_pink"."o MINOR TO BE CHECKED:\n";
@@ -752,6 +766,7 @@ sub print_compare_results_summary($$)
printf " | %-40s | %7d |\n", $UNRESOLVED_UNSUPPORTED, scalar(@{$res->{$UNRESOLVED_UNSUPPORTED}}) if (scalar(@{$res->{$UNRESOLVED_UNSUPPORTED}}));
printf " | %-40s | %7d |\n", $UNRESOLVED_UNTESTED, scalar(@{$res->{$UNRESOLVED_UNTESTED}}) if (scalar(@{$res->{$UNRESOLVED_UNTESTED}}));
printf " | %-40s | %7d |\n", $UNRESOLVED_DISAPPEARS, scalar(@{$res->{$UNRESOLVED_DISAPPEARS}}) if (scalar(@{$res->{$UNRESOLVED_DISAPPEARS}}));
+ printf " | %-40s | %7d |\n", $ERROR_DISAPPEARS, scalar(@{$res->{$ERROR_DISAPPEARS}}) if (scalar(@{$res->{$ERROR_DISAPPEARS}}));
printf " | %-40s | %7d |\n", $UNHANDLED_CASES, scalar(@{$res->{$UNHANDLED_CASES}}) if (scalar(@{$res->{$UNHANDLED_CASES}}));
printf " | %-40s | %7d |\n", $UNSTABLE_CASES, scalar(@{$res->{$UNSTABLE_CASES}}) if (scalar(@{$res->{$UNSTABLE_CASES}}));
printf " +------------------------------------------+---------+\n";
@@ -799,6 +814,7 @@ sub print_compare_results_summary($$)
print_tclist($UNRESOLVED_UNSUPPORTED, @{$res->{$UNRESOLVED_UNSUPPORTED}});
print_tclist($UNRESOLVED_UNTESTED, @{$res->{$UNRESOLVED_UNTESTED}});
print_tclist($UNRESOLVED_DISAPPEARS, @{$res->{$UNRESOLVED_DISAPPEARS}});
+ print_tclist($ERROR_DISAPPEARS, @{$res->{$ERROR_DISAPPEARS}});
print_tclist($UNHANDLED_CASES, @{$res->{$UNHANDLED_CASES}});
print_tclist($UNSTABLE_CASES, @{$res->{$UNSTABLE_CASES}});
}
diff --git a/testsuite/expected-1-2.txt b/testsuite/expected-1-2.txt
index 621989f..1d24ae9 100644
--- a/testsuite/expected-1-2.txt
+++ b/testsuite/expected-1-2.txt
@@ -7,6 +7,7 @@ o RUN STATUS: | REF | RES |
+------------------------------------------+---------+---------+
| Passes [PASS] | 9 | 11 |
| Unexpected fails [FAIL] | 10 | 10 |
+ | Errors [ERROR] | 1 | 1 |
| Unexpected passes [XPASS] | 8 | 9 |
| Expected fails [XFAIL] | 8 | 9 |
| Unresolved [UNRESOLVED] | 7 | 7 |
@@ -26,6 +27,7 @@ o REGRESSIONS:
| PASS now XPASS [PASS =>XPASS] | 1 |
| PASS now FAIL [PASS => FAIL] | 1 |
| PASS now UNRESOLVED [PASS =>UNRES] | 1 |
+ | ERROR appears [ =>ERROR] | 1 |
| XPASS now FAIL [XPASS=> FAIL] | 1 |
| XPASS appears [ =>XPASS] | 1 |
| XPASS now UNRESOLVED [XPASS=>UNRES] | 1 |
@@ -44,7 +46,7 @@ o REGRESSIONS:
| UNRESOLVED now XPASS [UNRES=>XPASS] | 1 |
| UNRESOLVED appears [ =>UNRES] | 1 |
+------------------------------------------+---------+
- | TOTAL_REGRESSIONS | 20 |
+ | TOTAL_REGRESSIONS | 21 |
+------------------------------------------+---------+
@@ -86,8 +88,9 @@ o MINOR TO BE CHECKED:
| UNRESOLVED now UNSUPP [UNRES=>UNSUP] | 1 |
| UNRESOLVED now UNTESTED [UNRES=>UNTES] | 1 |
| UNRESOLVED disappears [UNRES=> ] | 1 |
+ | ERROR disappears [ERROR=> ] | 1 |
+------------------------------------------+---------+
- | TOTAL_MINOR_TO_BE_CHECKED | 37 |
+ | TOTAL_MINOR_TO_BE_CHECKED | 38 |
+------------------------------------------+---------+
diff --git a/testsuite/sum-1.txt b/testsuite/sum-1.txt
index 27c6235..b626a8c 100644
--- a/testsuite/sum-1.txt
+++ b/testsuite/sum-1.txt
@@ -62,3 +62,5 @@ PASS: test1-pass-and-fails
FAIL: test1-pass-and-fails
FAIL: test1-fail-pass execution
+
+ERROR: (DejaGnu) proc "scan-dump-tree-not fail_test optimized 1" does not exist.
diff --git a/testsuite/sum-2.txt b/testsuite/sum-2.txt
index 5f5bf0f..32e69b1 100644
--- a/testsuite/sum-2.txt
+++ b/testsuite/sum-2.txt
@@ -68,3 +68,5 @@ PASS: test1-pass-and-fails
FAIL: test1-pass-and-fails
PASS: test1-fail-pass execution
+
+ERROR: (DejaGnu) proc "scan-dump-tree-not fail_test optimized 3" does not exist.