xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH OSSTEST] standalone: Make it possible to pass options to run-test
@ 2015-10-02  9:00 Ian Campbell
  0 siblings, 0 replies; only message in thread
From: Ian Campbell @ 2015-10-02  9:00 UTC (permalink / raw)
  To: ian.jackson, xen-devel; +Cc: Ian Campbell

Currently the remainder of the comnand line is passed after the host=
ident, which allows for other idents to be given, which isn't all that
useful in practice.

Instead arrange that any additional options up to a "--" marker are
passed before host= and anything after are passed after.

Since the options themselves have a leading -- this can confuse the
scripts own option parsing, meaning you may need more than one "--"
marker, the first to separate the standalone helper args from the ts
args and a second to separate from any ident optiopns.

./standalone run-test -h $HOST -- test-amd64-amd64-xl-xsm ts-host-install --rescue -- guest=debian

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 standalone | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/standalone b/standalone
index 84f3469..7ceaaad 100755
--- a/standalone
+++ b/standalone
@@ -325,11 +325,18 @@ case $op in
 	job=$1; shift
 	ts=$1; shift
 
+	options=
+	for i in $@ ; do
+	    if [ x$i = x-- ] ; then shift; break ; fi
+	    options="$options $i"
+	    shift
+	done
+
 	OSSTEST_CONFIG=$config \
 	OSSTEST_FLIGHT=$flight \
 	OSSTEST_HOST_REUSE=$reuse \
 	OSSTEST_JOB=$job \
-	    with_logging logs/$flight/$job.$ts.log ./$ts $hosts $@
+	    with_logging logs/$flight/$job.$ts.log ./$ts $options $hosts $@
 	;;
 
     get-job-status)
-- 
2.5.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-10-02  9:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-02  9:00 [PATCH OSSTEST] standalone: Make it possible to pass options to run-test Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).