]> 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:34:54 +0000 (14:34 +0200)
Sometimes a pairwise definition for a new ./configure switch is added
but not tested in the CI.

(cherry picked from commit 96563c6020a8a95442145408c299806f26a9055a)

dangerfile.py

index 05b5e42a106107eaab28aa28671b31b37ce62b6e..d6a32e51123c79e57d9216d148ec8e533fb70ca7 100644 (file)
@@ -396,11 +396,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