mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
bfbc9c1c45
When running tests, I often needed to modify `buildtests.inc.mk` to see the actual errors/standard output. This allows overwriting the default redirection of both to `/dev/null`. It is low level and directly given to the command execution. As it is interpreted by make, it can even be overwritten using build system variables: 'BUILDTEST_MAKE_REDIRECT=>/tmp/buildtest.$${board}.out 2>&1'
26 lines
675 B
Makefile
26 lines
675 B
Makefile
.PHONY: buildtest
|
|
|
|
BUILDTEST_MAKE_REDIRECT ?= >/dev/null 2>&1
|
|
|
|
ifeq ($(BUILD_IN_DOCKER),1)
|
|
buildtest: ..in-docker-container
|
|
else
|
|
buildtest:
|
|
@ \
|
|
RESULT=true ; \
|
|
for board in $(BOARDS); do \
|
|
$(COLOR_ECHO) -n "Building for $$board ... " ; \
|
|
BOARD=$${board} RIOT_CI_BUILD=1 RIOT_VERSION_OVERRIDE=buildtest \
|
|
$(MAKE) clean all -j $(NPROC) $(BUILDTEST_MAKE_REDIRECT); \
|
|
RES=$$? ; \
|
|
if [ $$RES -eq 0 ]; then \
|
|
$(COLOR_ECHO) "$(COLOR_GREEN)success.$(COLOR_RESET)" ; \
|
|
else \
|
|
$(COLOR_ECHO) "$(COLOR_RED)failed!$(COLOR_RESET)" ; \
|
|
RESULT=false ; \
|
|
fi ; \
|
|
$(MAKE) clean-intermediates >/dev/null 2>&1 || true; \
|
|
done ; \
|
|
$${RESULT}
|
|
endif # BUILD_IN_DOCKER
|