diff options
author | Alexey Neyman <stilor@att.net> | 2015-10-29 01:11:28 -0700 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2015-10-30 16:24:52 -0700 |
commit | 41891506f6869526d46e96ff23d3b7b8f7ed96c9 (patch) | |
tree | ef70a996c20315dbeee2a732b0496989052105e5 /samples/samples.mk | |
parent | aba43b63d31f94ec9598a3e0e5008f25a82b64fd (diff) | |
download | crosstool-ng-41891506f6869526d46e96ff23d3b7b8f7ed96c9.tar.gz crosstool-ng-41891506f6869526d46e96ff23d3b7b8f7ed96c9.tar.bz2 crosstool-ng-41891506f6869526d46e96ff23d3b7b8f7ed96c9.zip |
Do not stop build-all after a failed sample.
Instead, continue until the end and provide a summary (PASS/XFAIL/FAIL)
at the end. If there are any FAILs, exit with code 1.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'samples/samples.mk')
-rw-r--r-- | samples/samples.mk | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/samples/samples.mk b/samples/samples.mk index 48f4a74c..7f5a36c4 100644 --- a/samples/samples.mk +++ b/samples/samples.mk @@ -189,8 +189,16 @@ define build_sample $(SILENT)if [ ! -z "$(call host_triplet,$(1))" -a -d "$(call prefix_dir,$(call host_triplet,$(1)))" ]; then \ PATH="$$PATH:$(call prefix_dir,$(call host_triplet,$(1)))/bin"; \ fi; \ - $(MAKE) -rf $(CT_NG) V=0 build - @printf '\r' + if $(MAKE) -rf $(CT_NG) V=0 build; then \ + status=PASS; \ + elif [ -e $(call sample_dir,$(1))/broken ]; then \ + status=XFAIL; \ + else \ + status=FAIL; \ + fi; \ + printf '\r %-5s %s\n' $$status '$(1)'; \ + mkdir -p .build-all/$$status/$(1); \ + bzip2 < build.log > .build-all/$$status/$(1)/build.log.bz2 endef # ---------------------------------------------------------- @@ -218,7 +226,27 @@ CT_SAMPLES_CANADIAN = $(strip $(foreach s,$(CT_SAMPLES),$(if $(findstring $(__co # Build all samples; first, build simple cross as canadian configurations may depend on # build-to-host cross being pre-built. -build-all: $(patsubst %,build-%,$(CT_SAMPLES_CROSS) $(CT_SAMPLES_CANADIAN)) +build-all: build-all-pre $(patsubst %,build-%,$(CT_SAMPLES_CROSS) $(CT_SAMPLES_CANADIAN)) + @echo + @if [ -d .build-all/PASS ]; then \ + echo 'Success:'; \ + (cd .build-all/PASS && ls | sed 's/^/ - /'); \ + echo; \ + fi + @if [ -d .build-all/XFAIL ]; then \ + echo 'Expected failure:'; \ + (cd .build-all/XFAIL && ls | sed 's/^/ - /'); \ + echo; \ + fi + @if [ -d .build-all/FAIL ]; then \ + echo 'Failure:'; \ + (cd .build-all/FAIL && ls | sed 's/^/ - /'); \ + echo; \ + fi + @[ ! -d .build-all/FAIL ] + +build-all-pre: + @rm -rf .build-all # Build all samples, overiding the number of // jobs per sample build-all.%: |