[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 19/32] iotests: allow test discovery before building
From: |
Alex Bennée |
Subject: |
[PATCH v2 19/32] iotests: allow test discovery before building |
Date: |
Wed, 15 Mar 2023 17:43:18 +0000 |
From: Daniel P. Berrangé <berrange@redhat.com>
The 'check' script can be invoked in "dry run" mode, in which case it
merely does test discovery and prints out all their names. Despite only
doing test discovery it still validates that the various QEMU binaries
can be found. This makes it impossible todo test discovery prior to
building QEMU. This is a desirable feature to support, because it will
let meson discover tests.
Fortunately the code in the TestEnv constructor is ordered in a way
that makes this fairly trivial to achieve. We can just short circuit
the constructor after the basic directory paths have been set.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Acked-by: Hanna Czenczek <hreitz@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230303160727.3977246-3-berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
tests/qemu-iotests/check | 3 ++-
tests/qemu-iotests/testenv.py | 7 ++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index da7e8a87fe..bb294ef556 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -145,7 +145,8 @@ 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 aa9d735414..9a37ad9152 100644
--- a/tests/qemu-iotests/testenv.py
+++ b/tests/qemu-iotests/testenv.py
@@ -178,7 +178,8 @@ def __init__(self, source_dir: str, build_dir: 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
@@ -218,6 +219,10 @@ def __init__(self, source_dir: str, build_dir: str,
self.build_root = os.path.join(self.build_iotests, '..', '..')
self.init_directories()
+
+ if dry_run:
+ return
+
self.init_binaries()
self.malloc_perturb_ = os.getenv('MALLOC_PERTURB_',
--
2.39.2
- [PATCH v2 05/32] gitlab: update centos-8-stream job, (continued)
- [PATCH v2 05/32] gitlab: update centos-8-stream job, Alex Bennée, 2023/03/15
- [PATCH v2 06/32] include/qemu: add documentation for memory callbacks, Alex Bennée, 2023/03/15
- [PATCH v2 07/32] tests/tcg: add some help output for running individual tests, Alex Bennée, 2023/03/15
- [PATCH v2 15/32] *: Add missing includes of qemu/plugin.h, Alex Bennée, 2023/03/15
- [PATCH v2 14/32] *: Add missing includes of qemu/error-report.h, Alex Bennée, 2023/03/15
- [PATCH v2 17/32] include/qemu/plugin: Inline qemu_plugin_disable_mem_helpers, Alex Bennée, 2023/03/15
- [PATCH v2 16/32] include/qemu: Split out plugin-event.h, Alex Bennée, 2023/03/15
- [PATCH v2 18/32] iotests: explicitly pass source/build dir to 'check' command, Alex Bennée, 2023/03/15
- [PATCH v2 19/32] iotests: allow test discovery before building,
Alex Bennée <=
- [PATCH v2 20/32] iotests: strip subdir path when listing tests, Alex Bennée, 2023/03/15
- [PATCH v2 21/32] iotests: print TAP protocol version when reporting tests, Alex Bennée, 2023/03/15
- [PATCH v2 24/32] iotests: register each I/O test separately with meson, Alex Bennée, 2023/03/15
- [PATCH v2 27/32] contrib/gitdm: Add SYRMIA to the domain map, Alex Bennée, 2023/03/15
- [PATCH v2 26/32] contrib/gitdm: Add ASPEED Technology to the domain map, Alex Bennée, 2023/03/15
- [PATCH v2 32/32] contrib/gitdm: add group map for AMD, Alex Bennée, 2023/03/15
- [PATCH v2 12/32] tcg: Drop plugin_gen_disable_mem_helpers from tcg_gen_exit_tb, Alex Bennée, 2023/03/15
- [PATCH v2 09/32] include/exec: fix kerneldoc definition, Alex Bennée, 2023/03/15