From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH OSSTEST v2 3/3] standalone: Make it possible to pass options to run-test
Date: Fri, 2 Oct 2015 13:05:49 +0100 [thread overview]
Message-ID: <1443787549-7467-3-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1443787531.11707.80.camel@citrix.com>
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 e4c16d7..3cbcb30 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
next prev parent reply other threads:[~2015-10-02 12:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-02 12:05 [PATCH OSSTEST v2 0/3] Misc standalone wrapper improvements Ian Campbell
2015-10-02 12:05 ` [PATCH OSSTEST v2 1/3] cs-adjust-flight: Add job-status to report job stats Ian Campbell
2015-10-05 10:48 ` Ian Jackson
2015-10-05 13:53 ` Ian Campbell
2015-10-02 12:05 ` [PATCH OSSTEST v2 2/3] standalone: Check job status at end of run-job Ian Campbell
2015-10-02 12:05 ` Ian Campbell [this message]
2015-10-05 10:50 ` [PATCH OSSTEST v2 3/3] standalone: Make it possible to pass options to run-test Ian Jackson
2015-10-05 13:47 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1443787549-7467-3-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).