All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, "Fam Zheng" <famz@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [Qemu-devel] [PATCH v3 1/4] tests: Add an option for snapshot (default: off)
Date: Thu, 12 Jul 2018 09:28:26 +0800	[thread overview]
Message-ID: <20180712012829.20231-2-famz@redhat.com> (raw)
In-Reply-To: <20180712012829.20231-1-famz@redhat.com>

Not using snapshot has the benefit of automatically persisting useful
test harnesses, such as docker images and ccache database. Although it
will lose some cleanness, it is imaginably useful for patchew.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 tests/vm/basevm.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 3643117816..e5d6a328d5 100755
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -216,6 +216,8 @@ def parse_args(vm_name):
                       help="build QEMU from source in guest")
     parser.add_option("--interactive", "-I", action="store_true",
                       help="Interactively run command")
+    parser.add_option("--snapshot", "-s", action="store_true",
+                      help="run tests with a snapshot")
     parser.disable_interspersed_args()
     return parser.parse_args()
 
@@ -241,7 +243,10 @@ def main(vmcls):
                    jobs=args.jobs)]
         else:
             cmd = argv
-        vm.boot(args.image + ",snapshot=on")
+        img = args.image
+        if args.snapshot:
+            img += ",snapshot=on"
+        vm.boot(img)
         vm.wait_ssh()
     except Exception as e:
         if isinstance(e, SystemExit) and e.code == 0:
-- 
2.17.1

  reply	other threads:[~2018-07-12  1:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-12  1:28 [Qemu-devel] [PATCH v3 0/4] Add a CentOS test image to run docker tests Fam Zheng
2018-07-12  1:28 ` Fam Zheng [this message]
2018-07-12  1:28 ` [Qemu-devel] [PATCH v3 2/4] tests/vm: Pass verbose flag into VM make commands Fam Zheng
2018-07-12  1:28 ` [Qemu-devel] [PATCH v3 3/4] tests: Allow overriding archive path with SRC_ARCHIVE Fam Zheng
2018-07-12  1:28 ` [Qemu-devel] [PATCH v3 4/4] tests: Add centos VM testing Fam Zheng
2018-07-12 15:02   ` Philippe Mathieu-Daudé
2018-07-13  7:18     ` Fam Zheng
2018-07-16  1:41       ` Philippe Mathieu-Daudé
2018-07-16  1:34   ` Philippe Mathieu-Daudé
2018-07-16  2:10     ` Fam Zheng
2018-07-17  1:09       ` Philippe Mathieu-Daudé
2018-07-12 14:50 ` [Qemu-devel] [PATCH v3 0/4] Add a CentOS test image to run docker tests Philippe Mathieu-Daudé

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=20180712012829.20231-2-famz@redhat.com \
    --to=famz@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=f4bug@amsat.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.