test: support TEST_NO_QEMU in mkosi integration wrapper
authorLuca Boccassi <bluca@debian.org>
Mon, 17 Jun 2024 13:09:40 +0000 (14:09 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 18 Jun 2024 18:41:01 +0000 (20:41 +0200)
Same as the old integration test suite, allow skipping tests that
require qemu.
ppc64el's vsock support doesn't appear to work, so we'll skip it,
as it is already done in the legacy framework.

(cherry picked from commit 464d182b3e470e4163ca376145539a537a6e43a2)

test/integration-test-wrapper.py

index 15b1ce10553372a5bcbd2792063bea638ea8f632..b6a16aa3efef876c3f403c10d578299dc704faff 100755 (executable)
@@ -57,6 +57,10 @@ def main():
         print(f"SYSTEMD_SLOW_TESTS=1 not found in environment, skipping {args.name}", file=sys.stderr)
         exit(77)
 
+    if args.vm and bool(int(os.getenv("TEST_NO_QEMU", "0"))):
+        print(f"TEST_NO_QEMU=1, skipping {args.name}", file=sys.stderr)
+        exit(77)
+
     name = args.name + (f"-{i}" if (i := os.getenv("MESON_TEST_ITERATION")) else "")
 
     dropin = textwrap.dedent(