From: mike Date: Thu, 7 Jun 2007 16:17:28 +0000 (+0000) Subject: Final report of success count and percentage. X-Git-Tag: v1.5~131 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=6f6f1c1a2da5e8353924d46fd0aa168056b31c91;p=cql-java-moved-to-github.git Final report of success count and percentage. --- diff --git a/test/regression/runtests b/test/regression/runtests index f1d462b..71004b7 100755 --- a/test/regression/runtests +++ b/test/regression/runtests @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -# $Id: runtests,v 1.7 2002-11-21 09:57:28 mike Exp $ +# $Id: runtests,v 1.8 2007-06-07 16:17:28 mike Exp $ use IO::File; use strict; @@ -13,6 +13,7 @@ if (@ARGV != 2) { } my $compiler = $ARGV[0]; my $norman = $ARGV[1]; # name of XML normaliser program +my($ntests, $ncorrect) = (0, 0); while () { my $sdir = $_; @@ -30,8 +31,10 @@ while () { my $correct = read_file("$norman < $afile |"); my $tested = read_file("$compiler < $qfile | $norman |") or print "\n *** test compiler exited non-zero\n"; + $ntests++; if ($tested eq $correct) { print "OK\n"; + $ncorrect++; } else { print "\n *** different XCQL output\n"; print "=== correct ===\n$correct"; @@ -40,6 +43,9 @@ while () { } } +print sprintf("%d of %d passed: %d%%\n", + $ncorrect, $ntests, (100 * $ncorrect) / $ntests); + sub read_file { my($name) = @_;