Commit 4760b84d authored by Robert Ricci's avatar Robert Ricci

Add the ability to overrride the assign binary, so that I can run

assign_wrapper in its place.
parent 5582d614
......@@ -10,6 +10,15 @@
# Common functions used by the scripts in the assign test harness
#
#
# Default configuration options
#
{
package CFG;
$assignopts = "-P";
$assignbin = "bin/assign";
}
#
# List all files in the ptop/ directory that match a certain pattern (passed
# to a shell). Return a list.
......@@ -102,6 +111,15 @@ sub readfileinfo() {
chomp(my $linkcount = `cat $linkcountfile`);
$$hashref{$file}{'links'} = $linkcount;
my $fdcountfile = "$type/counts/$file.fds";
if (!-e $fdcountfile) {
print "(re)Generating $fdcountfile for $type/$file\n";
system "egrep '^node' $type/$file | cut -f 2 -d '-' | wc -w > $fdcountfile";
}
chomp(my $fdcount = `cat $fdcountfile`);
$$hashref{$file}{'fds'} = $fdcount;
}
}
return (\%topinfo, \%ptopinfo);
......@@ -121,6 +139,8 @@ sub parseassignlog($) {
if ($line =~ /BEST SCORE:\s+(\d*\.*\d+) in (\d+) iters and (\d*\.*\d+) seconds/) {
($assigninfo{'bestscore'},$assigninfo{'iters'},
$assigninfo{'runtime'} ) = ($1,$2,$3);
} elsif ($line =~ /Generating physical equivalence classes:\s*(\d+)/) {
$assigninfo{'pclasses'} = $1;
}
}
if (!exists($assigninfo{'runtime'})) {
......
......@@ -42,7 +42,7 @@ foreach my $dir ($::testdir, $::outdir, $::statdir) {
# Actually run assign
#
foreach my $test (enumeratetests()) {
my $cmdline = "bin/assign $CFG::assignopts " . ptopfile($test) .
my $cmdline = "$CFG::assignbin $CFG::assignopts " . ptopfile($test) .
" " . topfile($test);
my $logfile = logfile($test);
print "Running $test ... ";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment