From b52d416cb05f51820c2eb6fc55cab907c1a3bb6a Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Fri, 28 Apr 2023 10:24:17 +0200 Subject: [PATCH] Add a friendly Danger plea to run the pairwise CI job Sometimes a pairwise definition for a new ./configure switch is added but not tested in the CI. (cherry picked from commit 96563c6020a8a95442145408c299806f26a9055a) --- dangerfile.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/dangerfile.py b/dangerfile.py index 925d0a4214..41cecb079a 100644 --- a/dangerfile.py +++ b/dangerfile.py @@ -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