qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-block@nongnu.org, Hanna Reitz <hreitz@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	qemu-devel@nongnu.org
Subject: [PATCH v2 4/8] tests/qemu-iotests: Allow to run "./check -n" from the source directory, too
Date: Wed,  9 Feb 2022 11:15:26 +0100	[thread overview]
Message-ID: <20220209101530.3442837-5-thuth@redhat.com> (raw)
In-Reply-To: <20220209101530.3442837-1-thuth@redhat.com>

For better integration of the iotests into the meson build system, it
would be very helpful to get the list of the tests in the "auto" group
during the "configure" step already. However, "check -n -g auto"
currently only works if the binaries have already been built. To fix this,
skip the check for the binaries while setting up the TestEnv.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/qemu-iotests/check      | 2 +-
 tests/qemu-iotests/testenv.py | 9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index 75de1b4691..a67b831534 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -124,7 +124,7 @@ if __name__ == '__main__':
                   aiomode=args.aiomode, cachemode=args.cachemode,
                   imgopts=args.imgopts, misalign=args.misalign,
                   debug=args.debug, valgrind=args.valgrind,
-                  gdb=args.gdb, qprint=args.print)
+                  gdb=args.gdb, qprint=args.print, dry_run=args.dry_run)
 
     if len(sys.argv) > 1 and sys.argv[-len(args.tests)-1] == '--':
         if not args.tests:
diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py
index 0f32897fe8..ec8c83ab07 100644
--- a/tests/qemu-iotests/testenv.py
+++ b/tests/qemu-iotests/testenv.py
@@ -180,7 +180,8 @@ def __init__(self, imgfmt: str, imgproto: str, aiomode: str,
                  debug: bool = False,
                  valgrind: bool = False,
                  gdb: bool = False,
-                 qprint: bool = False) -> None:
+                 qprint: bool = False,
+                 dry_run: bool = False) -> None:
         self.imgfmt = imgfmt
         self.imgproto = imgproto
         self.aiomode = aiomode
@@ -226,6 +227,12 @@ def __init__(self, imgfmt: str, imgproto: str, aiomode: str,
         self.build_root = os.path.join(self.build_iotests, '..', '..')
 
         self.init_directories()
+
+        # Don't try to look for binaries etc. in dry run mode, so that
+        # the dry run mode also works without building the binaries first
+        if dry_run:
+            return
+
         self.init_binaries()
 
         self.malloc_perturb_ = os.getenv('MALLOC_PERTURB_',
-- 
2.27.0



  parent reply	other threads:[~2022-02-09 10:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 10:15 [PATCH v2 0/8] Improve integration of iotests in the meson test harness Thomas Huth
2022-02-09 10:15 ` [PATCH v2 1/8] tests/qemu-iotests/testrunner: Allow parallel test invocations Thomas Huth
2022-02-11  9:29   ` Kevin Wolf
2022-02-11  9:38     ` Vladimir Sementsov-Ogievskiy
2022-02-11 13:53     ` Thomas Huth
2022-02-11 16:00       ` Kevin Wolf
2022-02-11 16:14         ` Hanna Reitz
2022-02-11 17:32           ` Kevin Wolf
2022-02-09 10:15 ` [PATCH v2 2/8] tests/qemu-iotests: Improve the check for GNU sed Thomas Huth
2022-02-11  8:57   ` Kevin Wolf
2022-02-09 10:15 ` [PATCH v2 3/8] tests/qemu-iotests/meson.build: Improve the indentation Thomas Huth
2022-02-09 10:15 ` Thomas Huth [this message]
2022-02-09 10:15 ` [PATCH v2 5/8] tests/qemu-iotests/meson.build: Call the 'check' script directly Thomas Huth
2022-02-09 10:15 ` [PATCH v2 6/8] tests: Do not treat the iotests as separate meson test target anymore Thomas Huth
2022-02-09 10:15 ` [PATCH v2 7/8] tests/qemu-iotests/testrunner: Print diff to stderr in TAP mode Thomas Huth
2022-02-15  8:36   ` Paolo Bonzini
2022-02-09 10:15 ` [PATCH v2 8/8] tests: Remove check-block.sh Thomas Huth

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=20220209101530.3442837-5-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --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 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).