mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-22 03:19:24 +00:00
Fix running multiple tests
This commit is contained in:
parent
f4429ba48c
commit
fc855cb30e
6
Makefile
6
Makefile
@ -414,10 +414,12 @@ define BUILD_TEST
|
|||||||
MAKE_VARS := TEST=$$(TEST_NAME)
|
MAKE_VARS := TEST=$$(TEST_NAME)
|
||||||
MAKE_MSG := $$(MSG_MAKE_TEST)
|
MAKE_MSG := $$(MSG_MAKE_TEST)
|
||||||
$$(eval $$(call BUILD))
|
$$(eval $$(call BUILD))
|
||||||
TESTS += $$(TEST_DIR)/$$(TEST_NAME).elf
|
TEST_EXECUTABLE := $$(TEST_DIR)/$$(TEST_NAME).elf
|
||||||
|
TESTS += $$(TEST_EXECUTABLE)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define PARSE_TEST
|
define PARSE_TEST
|
||||||
|
TESTS :=
|
||||||
TEST_NAME := $$(firstword $$(subst -, ,$$(RULE)))
|
TEST_NAME := $$(firstword $$(subst -, ,$$(RULE)))
|
||||||
TEST_TARGET := $$(subst $$(TEST_NAME),,$$(subst $$(TEST_NAME)-,,$$(RULE)))
|
TEST_TARGET := $$(subst $$(TEST_NAME),,$$(subst $$(TEST_NAME)-,,$$(RULE)))
|
||||||
MATCHED_TESTS := $$(foreach TEST,$$(TEST_LIST),$$(if $$(findstring $$(TEST_NAME),$$(TEST)),$$(TEST),))
|
MATCHED_TESTS := $$(foreach TEST,$$(TEST_LIST),$$(if $$(findstring $$(TEST_NAME),$$(TEST)),$$(TEST),))
|
||||||
@ -470,7 +472,7 @@ $(SUBPROJECTS): %: %-allkm
|
|||||||
+error_occured=0; \
|
+error_occured=0; \
|
||||||
$(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND)) \
|
$(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND)) \
|
||||||
if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi;\
|
if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi;\
|
||||||
$(foreach TEST,$(TESTS),$(TEST))
|
$(foreach TEST,$(TESTS),$(TEST);)
|
||||||
|
|
||||||
# All should compile everything
|
# All should compile everything
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
|
Loading…
Reference in New Issue
Block a user