[Compbench-devel] CompBenchmarks++/CBM-PI/t 02-CBMBenchmarkSelector-public.pl, 1.1, 1.2
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2006-12-28 17:41:41
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17951 Modified Files: 02-CBMBenchmarkSelector-public.pl Log Message: Many tests added. Index: 02-CBMBenchmarkSelector-public.pl =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/02-CBMBenchmarkSelector-public.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 02-CBMBenchmarkSelector-public.pl 28 Dec 2006 13:16:25 -0000 1.1 --- 02-CBMBenchmarkSelector-public.pl 28 Dec 2006 17:41:36 -0000 1.2 *************** *** 7,13 **** $top_srcdir =~ s/(.+)\/.*/$1/; ! my @benchmarks = `cat $top_srcdir/../../Benchmark/benchmarks.list | grep -v '^#' | cut -f1 -d':'`; chomp(@benchmarks); ! plan tests => (@benchmarks+0)*5; my $sys; --- 7,13 ---- $top_srcdir =~ s/(.+)\/.*/$1/; ! my @benchmarks = `cat $top_srcdir/../../SupportedBenchmarks/benchmarks.list | grep -v '^#' | cut -f1 -d':'`; chomp(@benchmarks); ! plan tests => (@benchmarks+0)*52; my $sys; *************** *** 42,51 **** my $b; foreach(@benchmarks) { $b = $BMS->select($_); ok(defined($b), "loading $_"); if (!defined($b)) { ! ok(0); ! ok(0); } --- 42,57 ---- my $b; + my %bm_hash; + foreach(@benchmarks) { + print ">$_\n"; $b = $BMS->select($_); ok(defined($b), "loading $_"); if (!defined($b)) { ! my $N = 14; ! while ($N--) { ! ok(0); ! } ! next; } *************** *** 56,60 **** my $pack = "$_"; $pack =~ s/^(.*?)-.+/$1/g; ! ok($pack eq $b->packageName(), "checking packageName() for $_"); } --- 62,95 ---- my $pack = "$_"; $pack =~ s/^(.*?)-.+/$1/g; ! ok($pack eq $b->packageName(), "checking packageName() for $_ : '$pack'/" . $b->packageName()); ! ! check_simple($b->packageVersion()); ! ! my $siz = $b->packageSize(); ! check_simple($siz); ! ok($siz > 0); ! ! check_simple($b->packageComments()); ! check_simple($b->localPackageName()); ! ! my $bn = $b->benchmarkName(); ! ! check_simple($bn); ! ok($bn eq $_, "checking benchmark's name : got '$bn', expected '$_'"); ! ! check_simple($b->benchmarkComments()); ! ! my $lang = $b->language(); ! check_simple($lang); ! ok( ($lang eq "C") || ($lang eq "C++")); ! ! check_simple($b->license()); ! ! check_simple($b->author()); ! check_simple($b->localPackageAbsoluteName()); ! check_simple($b->localPackageAbsoluteDirectory()); ! ! my $hast = $b->hasTest(); ! ok( ($hast==0) || ($hast==1) ); } |