From 2fb8d2772cdb2d78019d0e27fceaeb7b0a608f78 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Wed, 13 Apr 2016 20:09:08 -0700 Subject: [PATCH] make: allow to see boards failed when making 'buildall' It is quite annoying to see an error reported by buildall, but not knowing what board(s) actually failed to build. Create file for each board being built, put build progress information in it, and remove it if the board build succeeded. Then, once the build is completed see the failed boards in .failedboards/, if any, and the states they failed at. BRANCH=none BUG=none TEST=verified that the directory is empty after a successful buildall run, and has files named after failed boards in case of build failures. Change-Id: I67eb1671cadf58d9f8feccebfcc860524f33c2a0 Signed-off-by: Vadim Bendebury Reviewed-on: https://chromium-review.googlesource.com/338883 Reviewed-by: Randall Spangler Reviewed-by: Bill Richardson --- .gitignore | 1 + Makefile.rules | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a024f1eedd..2e9a5d62e3 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ tags TAGS cscope.* .tests-passed +.failedboards/ diff --git a/Makefile.rules b/Makefile.rules index 8e341e2585..5f7776e803 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -82,6 +82,7 @@ cmd_etags = etags -o $@ $(shell cat $<) cmd_ctags = ctags -o $@ $(shell cat $<) targ_if_prog = $(if $(shell which $(1) 2>/dev/null),$(2),) +FAILED_BOARDS_DIR = .failedboards # When building with -j, it's easy to miss errors. If you don't have your shell # configured to warn you about nonzero exit, you may not even notice that "make # buildall -j" failed. To make it more obvious, we'll do one level of recursion @@ -91,6 +92,9 @@ try_buildall: $(foreach b, $(boards), proj-$(b)) .PHONY: buildall buildall: + @rm -rf $(FAILED_BOARDS_DIR) + @mkdir $(FAILED_BOARDS_DIR) + @for b in $(boards); do echo 'starting' > $(FAILED_BOARDS_DIR)/$$b; done $(MAKE) try_buildall $(MAKE) runtests @touch .tests-passed @@ -108,8 +112,10 @@ endif # not a TEST_BUILD endif # CONFIG_EXPERIMENTAL_CONSOLE=y proj-%: - @echo "======= building $*"; \ + @echo 'building' > $(FAILED_BOARDS_DIR)/$* + @echo "======= building $*" $(MAKE) --no-print-directory BOARD=$* V=$(V) + @rm $(FAILED_BOARDS_DIR)/$* dis-y := $(out)/RW/$(PROJECT).RW.dis dis-$(CONFIG_FW_INCLUDE_RO) += $(out)/RO/$(PROJECT).RO.dis