public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Alexander Smirnov <asmirnov@ilbers.de>
To: isar-users@googlegroups.com
Cc: Alexander Smirnov <asmirnov@ilbers.de>
Subject: [PATCH 2/4] scripts: Add option to route start_vm output to file
Date: Fri,  6 Oct 2017 13:34:20 +0300	[thread overview]
Message-ID: <20171006103422.25393-3-asmirnov@ilbers.de> (raw)
In-Reply-To: <20171006103422.25393-1-asmirnov@ilbers.de>

Possibility to route QEMU output to file will be used for simple
smoke tests to check Isar QEMU images.

Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
 scripts/start_vm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/scripts/start_vm b/scripts/start_vm
index abf9eb0..444512b 100755
--- a/scripts/start_vm
+++ b/scripts/start_vm
@@ -28,6 +28,7 @@ qemu-system-$QEMU_ARCH \\\\\n\
     -kernel \$IMAGE_DIR/$KERNEL_IMAGE \\\\\n\
     -initrd \$IMAGE_DIR/$INITRD_IMAGE \\\\\n\
     -append \"console=$MACHINE_SERIAL root=/dev/$ROOTFS_DEV rw\" \\\\\n\
+    $EXTRA_ARGS \\\\\n\
     $root1"
 
     root2=`echo $QEMU_ROOTFS_DEV \
@@ -40,6 +41,7 @@ qemu-system-$QEMU_ARCH \\\\\n\
 	-kernel $IMAGE_DIR/$KERNEL_IMAGE \
 	-initrd $IMAGE_DIR/$INITRD_IMAGE \
 	-append "console=$MACHINE_SERIAL root=/dev/$ROOTFS_DEV rw" \
+	$EXTRA_ARGS \
 	$root2
 }
 
@@ -57,6 +59,8 @@ show_help() {
     echo "    -b, --build BUILD     set path to build directory."
     echo "    -d, --distro DISTRO   set isar Debian distribution."
     echo "                          Supported: jessie, stretch."
+    echo "    -o, --out FILE        Route QEMU console output to"
+    echo "                          specified file."
     echo "    --help                display this message and exit."
     echo
     echo "Exit status:"
@@ -91,6 +95,10 @@ do
         DISTRO=$2
         shift
         ;;
+    -o|--out)
+        EXTRA_ARGS="$EXTRA_ARGS -serial file:$2"
+        shift
+        ;;
     *)
         echo "error: invalid parameter '$key', please try '--help' to get list of supported parameters"
         exit $ES_BUG
-- 
2.1.4


  parent reply	other threads:[~2017-10-06 10:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-06 10:34 [PATCH 0/4] Simple smoke test for QEMU Alexander Smirnov
2017-10-06 10:34 ` [PATCH 1/4] scripts: Remove bashism from sh script Alexander Smirnov
2017-10-06 10:34 ` Alexander Smirnov [this message]
2017-10-06 10:34 ` [PATCH 3/4] scripts: Add option to store QEMU pid Alexander Smirnov
2017-10-06 10:34 ` [PATCH 4/4] scripts: Add simple smoke test Alexander Smirnov

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=20171006103422.25393-3-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