Skip to content

Commit 4413032

Browse files
committed
Makefile: T9014: add test-suite target to run core testcases sequentially
Add test-suite, which runs test-interfaces, test-no-interfaces-no-vpp, testc, testraid, and testifname as separate $(MAKE) invocations so it aborts on the first failing testcase instead of running all of them regardless of earlier failures.
1 parent 4058d50 commit 4413032

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ TEST_MEM := $(shell awk '/MemTotal/{if ($$2/1024/1024 >= 10) print 8; else print
1919
# to their scripts via $(MAKECMDGOALS). Those extra words are also goals as
2020
# far as make is concerned, so without this they'd fall through to the `%:`
2121
# flavor rule below and run build-vyos-image with garbage arguments.
22-
TEST_TARGETS := test test-no-interfaces test-no-interfaces-no-vpp test-interfaces test-vpp testc testcvpp testraid testsb testtpm testifname test-ci-qcow2 test-image-update qemu-live
22+
TEST_TARGETS := test test-no-interfaces test-no-interfaces-no-vpp test-interfaces test-vpp testc testcvpp testraid testsb testtpm testifname test-ci-qcow2 test-image-update qemu-live test-suite
2323
ifneq ($(filter $(TEST_TARGETS),$(firstword $(MAKECMDGOALS))),)
2424
$(eval $(filter-out $(firstword $(MAKECMDGOALS)),$(MAKECMDGOALS)):;@:)
2525
endif
@@ -87,6 +87,17 @@ testtpm:
8787
testifname:
8888
scripts/check-qemu-install --debug $(UEFI_FLAG) --ifnametest --iso $(ISO_PATH) $(filter-out $@,$(MAKECMDGOALS))
8989

90+
# Runs each test target as its own $(MAKE) invocation (rather than as
91+
# prerequisites) so make aborts immediately on the first failing testcase
92+
# instead of collecting failures across a parallel-eligible dependency list.
93+
.PHONY: test-suite
94+
test-suite:
95+
$(MAKE) test-interfaces
96+
$(MAKE) test-no-interfaces-no-vpp
97+
$(MAKE) testc
98+
$(MAKE) testraid
99+
$(MAKE) testifname
100+
90101
.PHONY: test-ci-qcow2
91102
.ONESHELL:
92103
test-ci-qcow2:

0 commit comments

Comments
 (0)