Commit aca0f001 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Reflect interface changes to the tb* scripts, and from the web pages.

We now pass through <pid> and <eid>, and do not munge the filenames.
parent 97d056f0
...@@ -4,22 +4,23 @@ ...@@ -4,22 +4,23 @@
# This gets invoked from the Web interface. CD into the proper directory # This gets invoked from the Web interface. CD into the proper directory
# and do the tb stuff. # and do the tb stuff.
# #
# usage: tbdoit <path to working directory> <project> <nsfile> # usage: tbdoit <path to working directory> <pid> <eid> <nsfile>
# #
my $tbdir = "/usr/testbed/bin/"; my $tbdir = "/usr/testbed/bin/";
if (@ARGV != 3) { if (@ARGV != 4) {
print STDOUT "Usage: tbdoit <working dir> <project> <file>\n"; print STDOUT "Usage: tbdoit <working dir> <pid> <eid> <nsfile>\n";
exit(-1); exit(-1);
} }
my $workdir = $ARGV[0]; my $workdir = $ARGV[0];
my $project = $ARGV[1]; my $project = $ARGV[1];
my $nsfile = $ARGV[2]; my $eid = $ARGV[2];
my $nsfile = $ARGV[3];
my $base = "$nsfile"; my $base = "$nsfile";
$_ = $nsfile; $_ = $base;
s/\.ns//g; s/\.ns//g;
$base = $_; $base = $_;
my $irfile = "$project$base.ir"; my $irfile = "$base.ir";
my $repfile = "$base.report"; my $repfile = "$base.report";
# #
...@@ -30,14 +31,14 @@ if (! chdir($workdir)) { ...@@ -30,14 +31,14 @@ if (! chdir($workdir)) {
exit(-1); exit(-1);
} }
print STDOUT "Running $tbdir/tbprerun with arguments: $project $nsfile\n"; print STDOUT "Running $tbdir/tbprerun with arguments: $project $eid $nsfile\n";
if (system("$tbdir/tbprerun $project $nsfile") != 0) { if (system("$tbdir/tbprerun $project $eid $nsfile") != 0) {
print STDOUT "tbprerun failed!\n"; print STDOUT "tbprerun failed!\n";
exit(-1); exit(-1);
} }
print STDOUT "Running tbrun with arguments: $irfile\n"; print STDOUT "Running $ybdir/tbrun with arguments: $project $eid $irfile\n";
if (system("$tbdir/tbrun $irfile") != 0) { if (system("$tbdir/tbrun $project $eid $irfile") != 0) {
print STDOUT "tbrun failed!\n"; print STDOUT "tbrun failed!\n";
exit(-1); exit(-1);
} }
......
...@@ -4,16 +4,18 @@ ...@@ -4,16 +4,18 @@
# This gets invoked from the Web interface. CD into the proper directory # This gets invoked from the Web interface. CD into the proper directory
# and do the tb stuff. # and do the tb stuff.
# #
# usage: tbstopit <path to working directory> <irfile> # usage: tbstopit <path to working directory> <project> <eid> <irfile>
# #
my $tbdir = "/usr/testbed/bin/"; my $tbdir = "/usr/testbed/bin/";
if (@ARGV != 2) { if (@ARGV != 4) {
print STDOUT "Usage: tbstopit <working dir> <irfile>\n"; print STDOUT "Usage: tbstopit <working dir> <project> <eid> <irfile>\n";
exit(-1); exit(-1);
} }
my $workdir = $ARGV[0]; my $workdir = $ARGV[0];
my $irfile = $ARGV[1]; my $project = $ARGV[1];
my $eid = $ARGV[2];
my $irfile = $ARGV[3];
# #
# We run the TB stuff in the given directory. # We run the TB stuff in the given directory.
......
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