Skip to content

Commit 469c3a0

Browse files
committed
Make CI: Check that CI knows about all CT_SUITES in CI
Instead of every time we run Make for these applications. This means that during development we are free to modify these values or create new test suites without having to worry about the check. If we forget to then add the test suites in PARALLEL_CT the workflow will tell us.
1 parent 48acb6a commit 469c3a0

File tree

3 files changed

+30
-4
lines changed

3 files changed

+30
-4
lines changed

.github/workflows/test-make.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ jobs:
4444
https://builds.hex.pm
4545
https://cdn.jsdelivr.net/hex
4646
47+
- name: SANITY CHECK (rabbit)
48+
run: make -C deps/rabbit parallel-ct-sanity-check
49+
50+
- name: SANITY CHECK (rabbitmq_mqtt)
51+
run: make -C deps/rabbitmq_mqtt parallel-ct-sanity-check
52+
4753
- name: BUILD
4854
run: make
4955

deps/rabbit/Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,18 @@ PARALLEL_CT_SET_4 = $(sort $(PARALLEL_CT_SET_4_A) $(PARALLEL_CT_SET_4_B) $(PARAL
279279
SEQUENTIAL_CT_SUITES = clustering_management dead_lettering feature_flags metadata_store_clustering quorum_queue rabbit_stream_queue
280280
PARALLEL_CT_SUITES = $(PARALLEL_CT_SET_1) $(PARALLEL_CT_SET_2) $(PARALLEL_CT_SET_3) $(PARALLEL_CT_SET_4)
281281

282-
ifneq ($(filter-out $(SEQUENTIAL_CT_SUITES) $(PARALLEL_CT_SUITES),$(CT_SUITES)),)
283-
$(error Some test suites in CT_SUITES but not configured for CI: $(filter-out $(SEQUENTIAL_CT_SUITES) $(PARALLEL_CT_SUITES),$(CT_SUITES)))
282+
ifeq ($(filter-out $(SEQUENTIAL_CT_SUITES) $(PARALLEL_CT_SUITES),$(CT_SUITES)),)
283+
parallel-ct-sanity-check:
284+
$(verbose) :
285+
else
286+
parallel-ct-sanity-check:
287+
$(verbose) printf "%s\n" \
288+
"In order for new test suites to be run in CI, the test suites" \
289+
"must be added to one of the PARALLEL_CT_SET_<N>_<M> variables." \
290+
"" \
291+
"The following test suites are missing:" \
292+
"$(filter-out $(SEQUENTIAL_CT_SUITES) $(PARALLEL_CT_SUITES),$(CT_SUITES))"
293+
$(verbose) exit 1
284294
endif
285295

286296
define tpl_parallel_ct_test_spec

deps/rabbitmq_mqtt/Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,18 @@ PARALLEL_CT_SET_1_D = mqtt_shared
102102

103103
PARALLEL_CT_SUITES = $(PARALLEL_CT_SET_1_A) $(PARALLEL_CT_SET_1_B) $(PARALLEL_CT_SET_1_C) $(PARALLEL_CT_SET_1_D)
104104

105-
ifneq ($(filter-out $(PARALLEL_CT_SUITES),$(CT_SUITES)),)
106-
$(error Some test suites in CT_SUITES but not configured for CI: $(filter-out $(PARALLEL_CT_SUITES),$(CT_SUITES)))
105+
ifeq ($(filter-out $(SEQUENTIAL_CT_SUITES) $(PARALLEL_CT_SUITES),$(CT_SUITES)),)
106+
parallel-ct-sanity-check:
107+
$(verbose) :
108+
else
109+
parallel-ct-sanity-check:
110+
$(verbose) printf "%s\n" \
111+
"In order for new test suites to be run in CI, the test suites" \
112+
"must be added to one of the PARALLEL_CT_SET_<N>_<M> variables." \
113+
"" \
114+
"The following test suites are missing:" \
115+
"$(filter-out $(SEQUENTIAL_CT_SUITES) $(PARALLEL_CT_SUITES),$(CT_SUITES))"
116+
$(verbose) exit 1
107117
endif
108118

109119
define tpl_parallel_ct_test_spec

0 commit comments

Comments
 (0)