]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Report all unregistered unit test files at once 12220/head
authorMichal Nowak <mnowak@isc.org>
Tue, 9 Jun 2026 16:11:51 +0000 (16:11 +0000)
committerMichal Nowak <mnowak@isc.org>
Wed, 24 Jun 2026 11:57:07 +0000 (13:57 +0200)
Collect every unregistered unit test file before exiting instead of
failing on the first one, so a single configure run lists them all.

Assisted-by: Claude:claude-opus-4-8
util/check_test_registration.py

index 1bde17ef77cd262b102e02e90fd9c9a9b7d9caba..fad3c9b14c3e4d2ea52efa1672668cb9dd4d73e1 100644 (file)
@@ -17,12 +17,17 @@ import sys
 test_dir = sys.argv[1]
 registered = sys.argv[2:]
 
+missing = []
 for path in sorted(glob.glob(os.path.join(test_dir, "*_test.c"))):
     name = os.path.basename(path).removesuffix("_test.c")
     if name not in registered:
+        missing.append((os.path.basename(path), name))
+
+if missing:
+    for filename, name in missing:
         print(
-            f"Unit test file {os.path.basename(path)} is not registered"
+            f"Unit test file {filename} is not registered"
             f" (add '{name}' to the list)",
             file=sys.stderr,
         )
-        sys.exit(1)
+    sys.exit(1)