]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add a friendly Danger plea to run the pairwise CI job
authorMichal Nowak <mnowak@isc.org>
Fri, 28 Apr 2023 08:24:17 +0000 (10:24 +0200)
committerMichal Nowak <mnowak@isc.org>
Fri, 19 May 2023 12:11:54 +0000 (14:11 +0200)
Sometimes a pairwise definition for a new ./configure switch is added
but not tested in the CI.

dangerfile.py

index 925d0a42146254fbdb805388957ebda9e04c8e67..41cecb079a23e99144f816a1ecddd93f93015e9c 100644 (file)
@@ -398,11 +398,19 @@ switches_added = lines_containing(
     configure_added_lines, "AC_ARG_ENABLE"
 ) + lines_containing(configure_added_lines, "AC_ARG_WITH")
 annotations_added = lines_containing(configure_added_lines, "# [pairwise: ")
-if len(switches_added) > len(annotations_added):
-    fail(
-        "This merge request adds at least one new `./configure` switch that "
-        "is not annotated for pairwise testing purposes."
-    )
+if switches_added:
+    if len(switches_added) > len(annotations_added):
+        fail(
+            "This merge request adds at least one new `./configure` switch that "
+            "is not annotated for pairwise testing purposes."
+        )
+    else:
+        message(
+            "**Before merging**, please start a full CI pipeline for this "
+            "branch with the `PAIRWISE_TESTING` variable set to any "
+            "non-empty value (e.g. `1`). This will cause the `pairwise` "
+            "job to exercise the new `./configure` switches."
+        )
 
 ###############################################################################
 # USER-VISIBLE LOG LEVELS