mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-22 01:59:26 +00:00
Flag missing pairwise testing markers
Make the Danger GitLab CI job fail when a merge request adds a new ./configure switch without also adding a "# [pairwise: ...]" marker that the relevant GitLab CI job uses for preparing the pairwise testing model. This helps to ensure that any newly added ./configure switches are tested by the pairwise testing GitLab CI job.
This commit is contained in:
parent
d81ad454cc
commit
ff58ec8cef
@ -238,3 +238,18 @@ if lines_containing(changes_added_lines, '[security]'):
|
||||
if not lines_containing(notes_added_lines, 'CVE-20'):
|
||||
fail('This merge request fixes a security issue. '
|
||||
'Please add a release note which includes a CVE identifier.')
|
||||
|
||||
###############################################################################
|
||||
# PAIRWISE TESTING
|
||||
###############################################################################
|
||||
#
|
||||
# FAIL if the merge request adds any new ./configure switch without an
|
||||
# associated annotation used for pairwise testing.
|
||||
|
||||
configure_added_lines = added_lines(target_branch, ['configure.ac'])
|
||||
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.')
|
||||
|
Loading…
x
Reference in New Issue
Block a user