#!/usr/local/bin/perl
# ***********************************************************************
# * COPYRIGHT:
-# * Copyright (c) 2002-2004, International Business Machines Corporation
+# * Copyright (c) 2002-2013, International Business Machines Corporation
# * and others. All Rights Reserved.
# ***********************************************************************
if($options{"passes"}) {
$NUMPASSES = $options{"passes"};
}
-
+
if($options{"dataDir"}) {
$DATADIR = $options{"dataDir"};
}
# Added by Doug
if ($options{"iterations"}) {
- $ITERATIONS = $options{"iterations"};
+ $ITERATIONS = $options{"iterations"};
}
}
if (%datafiles) {
foreach $locale (sort keys %datafiles ) {
foreach $data (@{ $datafiles{$locale} }) {
- closeTable;
- my $locdata = "";
- if(!($locale eq "")) {
- $locdata = "<b>Locale:</b> $locale<br>";
- }
- $locdata .= "<b>Datafile:</b> $data<br>";
- startTest($locdata);
-
- if($DATADIR) {
- compareLoop ($tests, $locale, $DATADIR."/".$data);
- } else {
- compareLoop ($tests, $locale, $data);
- }
+ closeTable;
+ my $locdata = "";
+ if(!($locale eq "")) {
+ $locdata = "<b>Locale:</b> $locale<br>";
+ }
+ $locdata .= "<b>Datafile:</b> $data<br>";
+ startTest($locdata);
+
+ if($DATADIR) {
+ compareLoop ($tests, $locale, $DATADIR."/".$data);
+ } else {
+ compareLoop ($tests, $locale, $data);
+ }
}
}
} else {
my $datafile = shift;
my $locAndData = "";
if($locale) {
- $locAndData .= " -L $locale";
+ $locAndData .= " -L \"$locale\"";
}
if($datafile) {
$locAndData .= " -f $datafile";
}
-
+
my $args;
my ($i, $j, $aref);
foreach $i ( sort keys %tests ) {
for $j ( 0 .. $#{$aref} ) {
# first we calibrate. Use time from somewhere
# first test is used for calibration
- ($program, @argsAndTest) = split(/\ /, @{ $tests{$i} }[$j]);
+ ($program, @argsAndTest) = split(/,/, @{ $tests{$i} }[$j]);
#Modified by Doug
my $commandLine;
if ($ITERATIONS) {
- $commandLine = "$program -i $ITERATIONS -p $NUMPASSES $locAndData @argsAndTest";
+ $commandLine = "$program -i $ITERATIONS -p $NUMPASSES $locAndData @argsAndTest";
} else {
- $commandLine = "$program -t $TIME -p $NUMPASSES $locAndData @argsAndTest";
- }
+ $commandLine = "$program -t $TIME -p $NUMPASSES $locAndData @argsAndTest";
+ }
#my $commandLine = "$program -i 5 -p $NUMPASSES $locAndData @argsAndTest";
my @res = measure1($commandLine);
store("$i, $program @argsAndTest", @res);
push(@noopers, shift(@res));
my @data = @{ shift(@res) };
if($#res >= 0) {
- push(@noevents, shift(@res));
- }
-
+ push(@noevents, shift(@res));
+ }
shift(@data) if (@data > 1); # discard first run
}
else {
- die "Can't parse: $_";
+ # die "Can't parse: $_";
}
}