diff options
author | Fred Sundvik <fsundvik@gmail.com> | 2016-08-27 14:53:57 +0300 |
---|---|---|
committer | Fred Sundvik <fsundvik@gmail.com> | 2016-08-27 21:57:49 +0300 |
commit | 7eefb34e7c4f162b9568ff880d0e4e5214e1b9c9 (patch) | |
tree | a132b7c8f378cadd46760c58370e6e2a52bf65e1 /Makefile | |
parent | ffb0a126f5b2484eda7f6b1c62ea61924eec6521 (diff) | |
download | qmk_firmware-7eefb34e7c4f162b9568ff880d0e4e5214e1b9c9.tar.gz |
Detect failures when running multiple tests
Also add better output.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -415,7 +415,15 @@ define BUILD_TEST MAKE_MSG := $$(MSG_MAKE_TEST) $$(eval $$(call BUILD)) TEST_EXECUTABLE := $$(TEST_DIR)/$$(TEST_NAME).elf - TESTS += $$(TEST_EXECUTABLE) + TESTS += $$(TEST_NAME) + TEST_MSG := $$(MSG_TEST) + $$(TEST_NAME)_COMMAND := \ + printf "$$(TEST_MSG)\n"; \ + $$(TEST_EXECUTABLE); \ + if [ $$$$? -gt 0 ]; \ + then error_occured=1; \ + fi; \ + printf "\n"; endef define PARSE_TEST @@ -472,7 +480,8 @@ $(SUBPROJECTS): %: %-allkm +error_occured=0; \ $(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND)) \ if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi;\ - $(foreach TEST,$(TESTS),$(TEST);) + $(foreach TEST,$(TESTS),$($(TEST)_COMMAND)) \ + if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi;\ # All should compile everything .PHONY: all |