diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2016-04-13 20:09:08 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-04-14 17:28:25 -0700 |
commit | 2fb8d2772cdb2d78019d0e27fceaeb7b0a608f78 (patch) | |
tree | 286dc7533414b3bde27e68264b9d4449c7bf84b6 | |
parent | a39347573064dd36e1907e083c6ef07e1bb42828 (diff) | |
download | chrome-ec-2fb8d2772cdb2d78019d0e27fceaeb7b0a608f78.tar.gz |
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 <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/338883
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.rules | 8 |
2 files changed, 8 insertions, 1 deletions
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 |