Commit 95733771 authored by Robert Ricci's avatar Robert Ricci

Minor patch on a very leaky boat - a fix for handling the 'static' types

that have been added to assign since this was last run. I'm sure there are
plenty of other new assign features it will botch.
parent 6e208b09
......@@ -98,8 +98,9 @@ $newgraph = combine_links($newgraph);
my $tmp_topfile = $topfile;
$tmp_topfile =~ s/(\.top)?$/-coarsened$1/;
print "Generating new topfile\n";
my @topfile = generate_topfile($newgraph);
print "Running assign\n";
my ($nodes, $edges) = run_assign($assign_bin, join(" ",@assign_args),
$tmp_topfile, \@topfile, $logfile);
......@@ -325,6 +326,11 @@ sub parse_ptop($) {
last if ($type eq "-");
my ($typename, $count) = split /:/, $type;
# Handle types that are 'static' (we mostly use this
# for lans and switches) by simply removing the static
# qualifier, which will not appear in the top file
$typename =~ s/^\*//;
# Handle types with no count or an 'infinite' count
if (!$count) {
$count = 1;
......@@ -420,6 +426,7 @@ sub run_assign($$$$$) {
open(ASSIGN,"|$assignbin $assignargs $topfile_name > $logfile");
close ASSIGN; # This will wait for the child process to die
print "assign completed\n";
if ($?) {
# Assign failed, just pass through the exit code and the assign output
warn "Assign failed\n";
......
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