|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 07/10] sg-run-job: testid generation: Process ts more like rest of args
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@xxxxxxxxxxxxx>
---
sg-run-job | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sg-run-job b/sg-run-job
index 5c192ab..070534d 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -103,12 +103,12 @@ proc run-ts {args} {
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 {}
}
@@ -127,7 +127,9 @@ proc spawn-ts {iffail testid ts args} {
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 {}
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |