]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: fix TEST_SKIP for test cases with subtests
authorLuca Boccassi <bluca@debian.org>
Wed, 11 Sep 2024 10:01:55 +0000 (12:01 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 20 Dec 2024 19:43:57 +0000 (19:43 +0000)
TEST-64-UDEV-STORAGE is invoked with the subtest appended, so TEST_SKIP=TEST-64-UDEV-STORAGE
does not work. Fix it by using TEST_SKIP as a partial match.

Follow-up for ddc91af4eaa32511f92c83b2c24d9cc0425fd5f5

(cherry picked from commit 8f4bbd096b27344c65998fafbad9c059ece52146)

test/integration-test-wrapper.py

index bb4fe6dbd100fbbc23bbf106812cc99efeec69c0..a680ddee5351cfc9efa105b81fd53b36520dd4a6 100755 (executable)
@@ -61,9 +61,10 @@ def main():
         print(f"TEST_NO_QEMU=1, skipping {args.name}", file=sys.stderr)
         exit(77)
 
-    if args.name in os.getenv("TEST_SKIP", "").split():
-        print(f"Skipping {args.name} due to TEST_SKIP", file=sys.stderr)
-        exit(77)
+    for s in os.getenv("TEST_SKIP", "").split():
+        if s in args.name:
+            print(f"Skipping {args.name} due to TEST_SKIP", file=sys.stderr)
+            exit(77)
 
     keep_journal = os.getenv("TEST_SAVE_JOURNAL", "fail")
     shell = bool(int(os.getenv("TEST_SHELL", "0")))