Merge pull request #11857 from cladmi/pr/make/buildtest/docker

makefiles/buildtest: always execute 'buildtest' loop on host machine
This commit is contained in:
Francisco 2019-08-14 17:53:18 +02:00 committed by GitHub
commit 3e753834e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 6 deletions

View File

@ -110,7 +110,7 @@ include $(RIOTMAKE)/info-nproc.inc.mk
# List of boards variables
include $(RIOTMAKE)/boards.inc.mk
GLOBAL_GOALS += buildtest info-boards-supported info-boards-features-missing info-buildsizes info-buildsizes-diff
GLOBAL_GOALS += buildtest buildtest-indocker info-boards-supported info-boards-features-missing info-buildsizes info-buildsizes-diff
ifneq (, $(filter $(GLOBAL_GOALS), $(MAKECMDGOALS)))
BOARD=none
endif

View File

@ -1,10 +1,7 @@
.PHONY: buildtest
.PHONY: buildtest buildtest-indocker
BUILDTEST_MAKE_REDIRECT ?= >/dev/null 2>&1
ifeq ($(BUILD_IN_DOCKER),1)
buildtest: ..in-docker-container
else
buildtest:
@ \
RESULT=true ; \
@ -24,4 +21,17 @@ buildtest:
fi; \
done ; \
$${RESULT}
# Define 'buildtest-indocker' completely executed inside the container.
# It prevents starting one container per compilation wich is slower but it
# could hide errors where the host toolchain would be used
ifeq ($(BUILD_IN_DOCKER),1)
buildtest-indocker: ..in-docker-container
else
ifeq ($(INSIDE_DOCKER),1)
buildtest-indocker: buildtest
else
buildtest-indocker:
$(error $@ must be run with `BUILD_IN_DOCKER=1`)
endif # INSIDE_DOCKER
endif # BUILD_IN_DOCKER

View File

@ -5,7 +5,7 @@ export DOCKER_FLAGS ?= --rm
# List of Docker-enabled make goals
export DOCKER_MAKECMDGOALS_POSSIBLE = \
all \
buildtest \
buildtest-indocker \
scan-build \
scan-build-analyze \
tests-% \