From bfbc9c1c45be78b52c17f5ca0165b019b8923129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Wed, 8 Aug 2018 14:34:48 +0200 Subject: [PATCH] makefiles/buildtests.inc.mk: allow overwriting make output redirection 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' --- makefiles/buildtests.inc.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/makefiles/buildtests.inc.mk b/makefiles/buildtests.inc.mk index 89e3af8b62..e67f9f4982 100644 --- a/makefiles/buildtests.inc.mk +++ b/makefiles/buildtests.inc.mk @@ -1,5 +1,7 @@ .PHONY: buildtest +BUILDTEST_MAKE_REDIRECT ?= >/dev/null 2>&1 + ifeq ($(BUILD_IN_DOCKER),1) buildtest: ..in-docker-container else @@ -9,7 +11,7 @@ buildtest: 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) >/dev/null 2>&1; \ + $(MAKE) clean all -j $(NPROC) $(BUILDTEST_MAKE_REDIRECT); \ RES=$$? ; \ if [ $$RES -eq 0 ]; then \ $(COLOR_ECHO) "$(COLOR_GREEN)success.$(COLOR_RESET)" ; \