manibuilder: Let build tests fail with the original error code
We can still run all tests with `make -k`.
Change-Id: Ib59b8863186e5f7ecbaa2aa65cdbd51913dcf8e7
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/70913
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
diff --git a/util/manibuilder/Makefile b/util/manibuilder/Makefile
index aff150f..294bc28 100644
--- a/util/manibuilder/Makefile
+++ b/util/manibuilder/Makefile
@@ -67,7 +67,8 @@
$(if $(STRIP),STRIP='$(STRIP)') \
$(if $(LIBS_BASE),LIBS_BASE='$(LIBS_BASE)') \
$(MAKEARGS)" \
- $(if $(QUIET_TEST),>/dev/null 2>&1) || echo $*: $$?
+ $(if $(QUIET_TEST),>/dev/null 2>&1) \
+ || { RET=$$?; echo $*: $${RET}; exit $${RET}; }
$(addsuffix -shell,$(ALL_TAGS)): %-shell: %-check-build
$(QUIET_SETUP)\
diff --git a/util/manibuilder/README.md b/util/manibuilder/README.md
index b00d618..ece2317 100644
--- a/util/manibuilder/README.md
+++ b/util/manibuilder/README.md
@@ -46,7 +46,7 @@
$ make register
[...]
$ # run the default target:
- $ make -j4
+ $ make -j4 -k 2>/dev/null
debian-debootstrap:mips-stretch: 2
debian-debootstrap:mips-sid: 2
debian-debootstrap:mips-buster: 2
@@ -56,7 +56,8 @@
For each *tag* that returns with a non-zero exit code, the *tag*
and actual exit code is printed. An exit code of `2` is most likely
as that is what *make* returns on failure. Other exit codes might
-hint towards a problem in the setup. Failing *tags* can then be
+hint towards a problem in the setup. The `-k` lets *make* continue
+running all *tags* even if one failed. Failing *tags* can then be
investigated individually with the <tag>-shell target, e.g.:
$ make debian-debootstrap:mips-sid-shell