From: Alexander Smirnov <asmirnov@ilbers.de>
To: isar-users@googlegroups.com
Cc: Alexander Smirnov <asmirnov@ilbers.de>
Subject: [PATCH 2/2] vm_smoke_test: Add parameters
Date: Fri, 11 May 2018 20:54:53 +0300 [thread overview]
Message-ID: <20180511175453.16173-2-asmirnov@ilbers.de> (raw)
In-Reply-To: <20180511175453.16173-1-asmirnov@ilbers.de>
Drop hardcoded settings from smoke test script. This provides possibility
to tune it and run on various hosts without script modification.
Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
scripts/vm_smoke_test | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/scripts/vm_smoke_test b/scripts/vm_smoke_test
index 1524603..a88d127 100755
--- a/scripts/vm_smoke_test
+++ b/scripts/vm_smoke_test
@@ -6,6 +6,7 @@
CONSOLE_OUTPUT=/tmp/isar_console
PID_FILE=/tmp/qemu.pid
VERBOSE=1
+TIMEOUT=60
# Error codes:
ES_OK=0
@@ -65,7 +66,7 @@ run_test () {
start_vm -a $ARCH -d $DISTRO -o $CONSOLE_OUTPUT -p $PID_FILE
echo "\n8<--"
else
- sleep 60
+ sleep $TIMEOUT
kill `cat $PID_FILE`
FAIL=0
@@ -89,9 +90,15 @@ show_help() {
echo " $0 [params]"
echo
echo "Parameters:"
+ echo " -o,--output FILE specify file to store console output."
+ echo " The default is: /tmp/isar_console"
+ echo " -p,--pid-file FILE specify file to store QEMU process PID."
+ echo " The default is: /tmp/qemu.pid"
echo " -q, --quite do not display boot logs for all the targets."
echo " If test failed for the specific configuration,"
echo " the respective boot log will be printed anyway."
+ echo " -t,--timeout SEC specify time in seconds to wait before stop QEMU."
+ echo " The default is: 60"
echo " -h, --help display this message and exit."
echo
echo "Exit status:"
@@ -110,9 +117,21 @@ do
show_help
exit 0
;;
+ -o|--output)
+ CONSOLE_OUTPUT=$2
+ shift
+ ;;
+ -p|--pid-file)
+ PID_FILE=$2
+ shift
+ ;;
-q|--quite)
VERBOSE=0
;;
+ -t|--timeout)
+ TIMEOUT=$2
+ shift
+ ;;
*)
echo "error: invalid parameter '$key', please try '--help' to get list of supported parameters"
exit $ES_BUG
--
2.1.4
next prev parent reply other threads:[~2018-05-11 17:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-11 17:54 [PATCH 1/2] vm_smoke_test: Drop wheezy from test Alexander Smirnov
2018-05-11 17:54 ` Alexander Smirnov [this message]
2018-05-14 13:49 ` Alexander Smirnov
2018-05-14 16:01 ` Henning Schild
2018-05-14 16:15 ` Alexander Smirnov
2018-05-15 16:37 ` Henning Schild
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=20180511175453.16173-2-asmirnov@ilbers.de \
--to=asmirnov@ilbers.de \
--cc=isar-users@googlegroups.com \
/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