summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-05-25 06:21:45 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-05-26 00:21:41 -0700
commit920d4bc14b082f1cbd8635134f8d22a94c4afb28 (patch)
treec5fe41e04b657740b77a40333d891372c2624324 /Makefile.rules
parent5c5eba404c9ec8c1d728f5f6691a110aea1efbb0 (diff)
downloadchrome-ec-920d4bc14b082f1cbd8635134f8d22a94c4afb28.tar.gz
Makefile.rules: Add buildalltests target
In rare cases, it is useful to be able to build tests for all boards: buildall only builds the main image, but -paladin builders also builds test cases for each board. Also remove/fix tests for boards that currently fail. BRANCH=none BUG=b:35647963 TEST=make buildalltests -j, wait a long time, tests pass. Change-Id: Id6d978705a40a2045731cb08ad2ca5d62cc12ebb Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1072218 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules17
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules
index a46006c51e..320cc7ec27 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -154,6 +154,17 @@ buildall: build_boards
@touch .tests-passed
@echo "$@ completed successfully!"
+.PHONY: try_build_tests
+try_build_tests: $(foreach b, $(BOARDS), tests-$(b))
+
+.PHONY: buildalltests
+buildalltests:
+ @rm -rf $(FAILED_BOARDS_DIR)
+ @mkdir $(FAILED_BOARDS_DIR)
+ @for b in $(BOARDS); do echo 'starting' > $(FAILED_BOARDS_DIR)/$$b; done
+ $(MAKE) try_build_tests
+ @echo "$@ completed successfully!"
+
showboards:
@echo $(sort $(boards))
@@ -174,6 +185,12 @@ proj-%:
$(MAKE) --no-print-directory BOARD=$* V=$(V)
@rm $(FAILED_BOARDS_DIR)/$*
+tests-%:
+ @echo 'building tests' > $(FAILED_BOARDS_DIR)/$*
+ @echo "======= building $* tests"
+ $(MAKE) --no-print-directory BOARD=$* V=$(V) tests
+ @rm $(FAILED_BOARDS_DIR)/$*
+
dis-y := $(out)/RW/$(PROJECT).RW.dis
dis-$(CONFIG_FW_INCLUDE_RO) += $(out)/RO/$(PROJECT).RO.dis
dis-$(CONFIG_SHAREDLIB) += $(out)/$(SHOBJLIB)/$(SHOBJLIB).dis