X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fregression%2Fruntests;h=1630be9e5310b5d481759fed3e6132cc4f2ed215;hb=00b61385371994aaf79ad06561e0d775754567ad;hp=71004b7475f33e95ef00daddf9a9b798c74b9908;hpb=6f6f1c1a2da5e8353924d46fd0aa168056b31c91;p=cql-java-moved-to-github.git diff --git a/test/regression/runtests b/test/regression/runtests index 71004b7..1630be9 100755 --- a/test/regression/runtests +++ b/test/regression/runtests @@ -1,10 +1,11 @@ #!/usr/bin/perl -w -# $Id: runtests,v 1.8 2007-06-07 16:17:28 mike Exp $ +# $Id: runtests,v 1.12 2007-07-03 15:53:52 mike Exp $ use IO::File; use strict; +$ENV{CLASSPATH} .= ":../../src/main/java"; $ENV{CLASSPATH} .= ":../../lib/cql-java.jar"; if (@ARGV != 2) { @@ -18,7 +19,7 @@ my($ntests, $ncorrect) = (0, 0); while () { my $sdir = $_; s@sections/@@; - next if /^CVS$/ || /^10$/; + next if /^CVS$/; print "testing section $_ - ", read_file("$sdir/name"), "\n"; while (<$sdir/*.cql>) { @@ -28,17 +29,18 @@ while () { my $afile = $qfile; $afile =~ s/\.cql$/.xcql/; print " query $_ - $query "; - 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) { + my $correct = read_file("$norman < $afile |"); + my $tested = read_file("$compiler < $qfile | $norman |"); + if (!$tested) { + print "\n *** test compiler exited non-zero\n"; + } elsif ($tested eq $correct) { print "OK\n"; $ncorrect++; } else { - print "\n *** different XCQL output\n"; - print "=== correct ===\n$correct"; + print "\n *** XCQL output differs from $afile\n"; print "=== tested ===\n$tested"; + print "=== end ===\n"; } } }