aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile13
-rw-r--r--message.mk1
2 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5f5c46860..b7ef5f92a 100644
--- a/Makefile
+++ b/Makefile
@@ -415,7 +415,15 @@ define BUILD_TEST
415 MAKE_MSG := $$(MSG_MAKE_TEST) 415 MAKE_MSG := $$(MSG_MAKE_TEST)
416 $$(eval $$(call BUILD)) 416 $$(eval $$(call BUILD))
417 TEST_EXECUTABLE := $$(TEST_DIR)/$$(TEST_NAME).elf 417 TEST_EXECUTABLE := $$(TEST_DIR)/$$(TEST_NAME).elf
418 TESTS += $$(TEST_EXECUTABLE) 418 TESTS += $$(TEST_NAME)
419 TEST_MSG := $$(MSG_TEST)
420 $$(TEST_NAME)_COMMAND := \
421 printf "$$(TEST_MSG)\n"; \
422 $$(TEST_EXECUTABLE); \
423 if [ $$$$? -gt 0 ]; \
424 then error_occured=1; \
425 fi; \
426 printf "\n";
419endef 427endef
420 428
421define PARSE_TEST 429define PARSE_TEST
@@ -472,7 +480,8 @@ $(SUBPROJECTS): %: %-allkm
472 +error_occured=0; \ 480 +error_occured=0; \
473 $(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND)) \ 481 $(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND)) \
474 if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi;\ 482 if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi;\
475 $(foreach TEST,$(TESTS),$(TEST);) 483 $(foreach TEST,$(TESTS),$($(TEST)_COMMAND)) \
484 if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi;\
476 485
477# All should compile everything 486# All should compile everything
478.PHONY: all 487.PHONY: all
diff --git a/message.mk b/message.mk
index 96814986b..fa051fd71 100644
--- a/message.mk
+++ b/message.mk
@@ -76,3 +76,4 @@ define GENERATE_MSG_MAKE_TEST
76 endif 76 endif
77endef 77endef
78MSG_MAKE_TEST = $(eval $(call GENERATE_MSG_MAKE_TEST))$(MSG_MAKE_TEST_ACTUAL) 78MSG_MAKE_TEST = $(eval $(call GENERATE_MSG_MAKE_TEST))$(MSG_MAKE_TEST_ACTUAL)
79MSG_TEST = Testing $(BOLD)$(TEST_NAME)$(NO_COLOR)