diff options
author | Raja R Harinath <harinath@hurrynot.org> | 2005-01-11 16:11:53 +0300 |
---|---|---|
committer | Raja R Harinath <harinath@hurrynot.org> | 2005-01-11 16:11:53 +0300 |
commit | 1dbb4dfb6a6d1661dda7a75cb3016074d8440dda (patch) | |
tree | 7b973e1076c39d02eefb9124b7b405a1a1b55c76 /mcs/errors/do-tests.pl | |
parent | ae3d99bce30108c202c144a4523ae5c4951cf563 (diff) | |
parent | f30c880b86ce6abd9022f93d33cd4b9e552a2965 (diff) |
* Makefile (all-local): Add CS0118-2-lib.dll.
(run-mcs-tests, runt-generics-tests): Don't pipe through tee. It
loses exit code of do-tests.pl.
* do-tests.pl (PROFILELOG): New. Copy all output to this file too.
* cs0234-2.cs: Bug #52697.
* cs0234-3.cs: Bug #57200.
* cs0118-2.cs, CS0118-2-lib.cs: Bug #67520.
* cs0538-2.cs: Remove bogus test.
svn path=/trunk/mcs/; revision=38687
Diffstat (limited to 'mcs/errors/do-tests.pl')
-rwxr-xr-x | mcs/errors/do-tests.pl | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/mcs/errors/do-tests.pl b/mcs/errors/do-tests.pl index 9183f094d8a..34be4fbf40e 100755 --- a/mcs/errors/do-tests.pl +++ b/mcs/errors/do-tests.pl @@ -88,12 +88,14 @@ my @status_items = ( my %results_map = (); my $total = 0; +open (PROFILELOG, ">$profile.log") or die "Cannot open log file $profile.log"; + foreach (glob ($files)) { - print "$_"; + print PROFILELOG "$_"; print "$_"; my ($error_number) = (/[a-z]*(\d+)(-\d+)?\.cs/); my $options = `sed -n 's,^// Compiler options:,,p' $_`; chomp $options; - print "..."; + print PROFILELOG "..."; print "..."; if (exists $ignore_map {$_}) { print "IGNORED\n"; @@ -126,31 +128,41 @@ foreach (glob ($files)) { } push @{$status_items [$status]}, $_; - print "$statuses[$status]\n"; + print PROFILELOG "$statuses[$status]\n"; print "$statuses[$status]\n"; $results_map{$_} = $status; } print "\n"; my $correct = scalar @{$status_items [$RESULT_CORRECT_ERROR]}; -print $correct, " correctly detected errors (", sprintf("%.2f",($correct / $total) * 100), " %) \n\n"; +my $pct = sprintf("%.2f",($correct / $total) * 100); +print PROFILELOG $correct, " correctly detected errors ($pct %) \n\n"; +print $correct, " correctly detected errors ($pct %) \n\n"; if (scalar @{$status_items [$RESULT_UNEXPECTED_CRASH]} > 0) { + print PROFILELOG scalar @{$status_items [$RESULT_UNEXPECTED_CRASH]}, " compiler crashes\n"; print scalar @{$status_items [$RESULT_UNEXPECTED_CRASH]}, " compiler crashes\n"; - print, print "\n" foreach @{$status_items [$RESULT_UNEXPECTED_CRASH]}; + print PROFILELOG "$_\n" foreach @{$status_items [$RESULT_UNEXPECTED_CRASH]}; + print "$_\n" foreach @{$status_items [$RESULT_UNEXPECTED_CRASH]}; } if (scalar @{$status_items [$RESULT_UNEXPECTED_CORRECT_ERROR]} > 0) { + print PROFILELOG scalar @{$status_items [$RESULT_UNEXPECTED_CORRECT_ERROR]}, " fixed error report(s), remove it from expect-wrong-error or expect-no-error !\n"; print scalar @{$status_items [$RESULT_UNEXPECTED_CORRECT_ERROR]}, " fixed error report(s), remove it from expect-wrong-error or expect-no-error !\n"; - print, print "\n" foreach @{$status_items [$RESULT_UNEXPECTED_CORRECT_ERROR]}; + print PROFILELOG "$_\n" foreach @{$status_items [$RESULT_UNEXPECTED_CORRECT_ERROR]}; + print "$_\n" foreach @{$status_items [$RESULT_UNEXPECTED_CORRECT_ERROR]}; } if (scalar @{$status_items [$RESULT_UNEXPECTED_INCORRECT_ERROR]} > 0) { + print PROFILELOG scalar @{$status_items [$RESULT_UNEXPECTED_INCORRECT_ERROR]}, " new incorrect error report(s) !\n"; print scalar @{$status_items [$RESULT_UNEXPECTED_INCORRECT_ERROR]}, " new incorrect error report(s) !\n"; - print, print "\n" foreach @{$status_items [$RESULT_UNEXPECTED_INCORRECT_ERROR]}; + print PROFILELOG "$_\n" foreach @{$status_items [$RESULT_UNEXPECTED_INCORRECT_ERROR]}; + print "$_\n" foreach @{$status_items [$RESULT_UNEXPECTED_INCORRECT_ERROR]}; } if (scalar @{$status_items [$RESULT_UNEXPECTED_NO_ERROR]} > 0) { + print PROFILELOG scalar @{$status_items [$RESULT_UNEXPECTED_NO_ERROR]}, " new missing error report(s) !\n"; print scalar @{$status_items [$RESULT_UNEXPECTED_NO_ERROR]}, " new missing error report(s) !\n"; - print, print "\n" foreach @{$status_items [$RESULT_UNEXPECTED_NO_ERROR]}; + print PROFILELOG "$_\n" foreach @{$status_items [$RESULT_UNEXPECTED_NO_ERROR]}; + print "$_\n" foreach @{$status_items [$RESULT_UNEXPECTED_NO_ERROR]}; } exit (( |