Remove ts as a separate parameter to spawn-ts. The test script now
becomes the first entry in args.
We process it through the arg loop as before. Currently there are no
calls where the first arg is `+' so the test script name ends up in
both real_args and testid_args.
We split it out of real_args into the ts variable with lshift.
We split it out of testid_args into the deftestid with lshift.
So afterwards in spawn-ts, all the variables (including real_args, ts,
deftestid and testid_args and hence host_testid_suffix) have the
values they would have had before.
Therefore there is no functional change for any existing calls.
However, because the first argument is not treated specially for the
`+' procesing loop, it is now possible to specify `+' as the first
entry in args to spawn-ts (ie where ts used to be) to arrange that the
deftestid (and hence, probably, the testid) is computed using later
arguments.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
if {![reap-ts $reap]} { error "test script failed" }
}
-proc spawn-ts {iffail testid ts args} {
+proc spawn-ts {iffail testid args} {
global flight c jobinfo reap_details env
if {[file exists abort]} {
jobdb::logputs stdout \
- "aborting - not executing $flight.$jobinfo(job) $ts $args"
+ "aborting - not executing $flight.$jobinfo(job) $args"
job-set-status $flight $jobinfo(job) aborted
return {}
}
if {$adding} { lappend testid_args $arg }
}
- regsub {^ts-} $ts {} deftestid
+ set ts [lshift real_args]
+
+ regsub {^ts-} [lshift testid_args] {} deftestid
append deftestid /@
set host_testid_suffix {}