diff options
author | Martin Baulig <martin@novell.com> | 2004-08-27 01:31:39 +0400 |
---|---|---|
committer | Martin Baulig <martin@novell.com> | 2004-08-27 01:31:39 +0400 |
commit | a395d67f24d403391336c6dddcca912bbb8d02f6 (patch) | |
tree | 145269fde417d270fbb95ba2592dce70055e388b /mcs/errors/do-tests.pl | |
parent | 2c28a66884fe680a03b8b06b6d41af8f8388ce73 (diff) |
2004-08-27 Martin Baulig <martin@ximian.com>
* do-tests.pl: Deal with compiler crashes.
* mcs-expect-no-error, mcs-expect-wrong-error: Updated.
svn path=/trunk/mcs/; revision=32904
Diffstat (limited to 'mcs/errors/do-tests.pl')
-rwxr-xr-x | mcs/errors/do-tests.pl | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/mcs/errors/do-tests.pl b/mcs/errors/do-tests.pl index 1b679c65b20..81b01fbb72a 100755 --- a/mcs/errors/do-tests.pl +++ b/mcs/errors/do-tests.pl @@ -45,6 +45,7 @@ my $RESULT_UNEXPECTED_INCORRECT_ERROR = 3; my $RESULT_EXPECTED_INCORRECT_ERROR = 4; my $RESULT_UNEXPECTED_NO_ERROR = 5; my $RESULT_EXPECTED_NO_ERROR = 6; +my $RESULT_UNEXPECTED_CRASH = 7; my @statuses = ( "UNEXPECTED SUCCESS", @@ -53,6 +54,7 @@ my @statuses = ( "INCORRECT ERROR", "UNEXPECTED NO ERROR", "NO ERROR", + "UNEXPECTED CRASH" ); my @status_items = ( @@ -62,6 +64,7 @@ my @status_items = ( [], [], [], + [], ); my %results_map = (); @@ -79,11 +82,13 @@ foreach (glob ($files)) { exit 1 if $? & 127; my $exit_value = $? >> 8; - - die "unexpected return from mcs" if $exit_value > 2; - + my $status; + if ($exit_value > 2) { + $status = $RESULT_UNEXPECTED_CRASH; + } + if ($exit_value == 0) { system "rm -f $testlogfile"; $status = $RESULT_UNEXPECTED_CORRECT_ERROR if exists $expecting_map {$_}; @@ -115,6 +120,9 @@ print, print "\n" foreach @{@status_items [($RESULT_UNEXPECTED_CORRECT_ERROR - 1 print scalar @{@status_items [($RESULT_UNEXPECTED_INCORRECT_ERROR - 1)]}, " Unexpected incorrect errors\n"; print, print "\n" foreach @{@status_items [($RESULT_UNEXPECTED_INCORRECT_ERROR - 1)]}; +print scalar @{@status_items [($RESULT_UNEXPECTED_CRASH - 1)]}, " Unexpected compiler crash\n"; +print, print "\n" foreach @{@status_items [($RESULT_UNEXPECTED_CRASH - 1)]}; + print scalar @{@status_items [($RESULT_UNEXPECTED_NO_ERROR - 1)]}, " Unexpected no errors\n"; print, print "\n" foreach @{@status_items [($RESULT_UNEXPECTED_NO_ERROR - 1)]}; @@ -122,12 +130,14 @@ print "\n"; print "OVERALL:"; print scalar @{@status_items [($RESULT_CORRECT_ERROR - 1)]}, " tests succeeded\n"; -print scalar @{@status_items [($RESULT_EXPECTED_INCORRECT_ERROR - 1)]} + scalar @{@status_items [($RESULT_EXPECTED_NO_ERROR - 1)]}, " known errors\n"; -print scalar @{@status_items [($RESULT_UNEXPECTED_INCORRECT_ERROR - 1)]} + scalar @{@status_items [($RESULT_UNEXPECTED_NO_ERROR - 1)]}, " errors\n"; +print scalar @{@status_items [($RESULT_EXPECTED_INCORRECT_ERROR - 1)]} + scalar @{@status_items [($RESULT_EXPECTED_NO_ERROR - 1)]}, " known errors (expected failures)\n"; +print scalar @{@status_items [($RESULT_UNEXPECTED_CRASH - 1)]}, " unexpected compiler crashes\n"; +print scalar @{@status_items [($RESULT_UNEXPECTED_INCORRECT_ERROR - 1)]} + scalar @{@status_items [($RESULT_UNEXPECTED_NO_ERROR - 1)]}, " errors (unexpected failures)\n"; print scalar @{@status_items [($RESULT_UNEXPECTED_CORRECT_ERROR - 1)]}, " new tests passing\n"; exit ( scalar @{@status_items [($RESULT_UNEXPECTED_INCORRECT_ERROR - 1)]} + scalar @{@status_items [($RESULT_UNEXPECTED_NO_ERROR - 1)]} + - scalar @{@status_items [($RESULT_UNEXPECTED_CORRECT_ERROR - 1)]} + scalar @{@status_items [($RESULT_UNEXPECTED_CORRECT_ERROR - 1)]} + + scalar @{@status_items [($RESULT_UNEXPECTED_CRASH - 1)]} ) == 0 ? 0 : 1; |