Commit f225870e authored by Robert Ricci's avatar Robert Ricci

Pass the gid into the parser, so that people can use it in their NS

files.
parent 59d5e48f
......@@ -141,8 +141,8 @@ if {${GLOBALS::anonymous} && ! ${GLOBALS::impotent}} {
if {${GLOBALS::anonymous} && ([llength $argv] != 1)} {
puts stderr "Syntax: $argv0 \[-q\] -n -a ns_file"
exit 1
} elseif {(! ${GLOBALS::anonymous}) && ([llength $argv] != 3)} {
puts stderr "Syntax: $argv0 \[-q\] \[-n \[-a\]\] pid eid ns_file"
} elseif {(! ${GLOBALS::anonymous}) && ([llength $argv] != 4)} {
puts stderr "Syntax: $argv0 \[-q\] \[-n \[-a\]\] pid gid eid ns_file"
exit 1
}
......@@ -151,12 +151,14 @@ namespace eval GLOBALS {
# Remaining arguments
if {$anonymous} {
variable pid "PID"
variable gid "GID"
variable eid "EID"
variable nsfile [lindex $argv 0]
} else {
variable pid [lindex $argv 0]
variable eid [lindex $argv 1]
variable nsfile [lindex $argv 2]
variable gid [lindex $argv 1]
variable eid [lindex $argv 2]
variable nsfile [lindex $argv 3]
}
# This is used to name class instances by the variables they
......
......@@ -79,6 +79,11 @@ if (! ($state = ExpState($pid, $eid))) {
" No such experiment $pid/$eid\n");
}
if (! ($gid = ExpGroup($pid,$eid))) {
die("*** $0:\n".
" Unable to get group for $pid/$eid\n");
}
if (! $modify) {
if (!$force && $state ne EXPTSTATE_NEW) {
die("*** $0:\n".
......@@ -119,7 +124,7 @@ sub cleanup {
# and tb-* handling.
print "Running parser ... " . TBTimeStamp() . "\n";
TBDebugTimeStamp("parser started");
if (system("parse-ns $pid $eid $nsfile")) {
if (system("parse-ns $pid $gid $eid $nsfile")) {
cleanup();
die("*** $0:\n".
" Parsing 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