1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-14 17:13:50 +01:00

buildsystem: remove "buildtest" goal

This commit is contained in:
crasbe 2025-04-04 09:57:13 +02:00
parent a84955c7ca
commit 90ea940896
6 changed files with 2 additions and 81 deletions

View File

@ -198,9 +198,6 @@ include $(RIOTMAKE)/docker.inc.mk
include $(RIOTMAKE)/utils/ansi.mk
include $(RIOTMAKE)/color.inc.mk
# include concurrency helpers
include $(RIOTMAKE)/info-nproc.inc.mk
# List of boards variables
include $(RIOTMAKE)/boards.inc.mk
@ -231,9 +228,7 @@ endif
include $(RIOTMAKE)/cargo-settings.inc.mk
GLOBAL_GOALS += buildtest \
buildtest-indocker \
info-boards-features-blacklisted \
GLOBAL_GOALS += info-boards-features-blacklisted \
info-boards-features-conflicting \
info-boards-features-missing \
info-boards-supported \
@ -243,7 +238,6 @@ GLOBAL_GOALS += buildtest \
ifneq (, $(filter $(GLOBAL_GOALS), $(MAKECMDGOALS)))
include $(RIOTMAKE)/info-global.inc.mk
include $(RIOTMAKE)/buildtests.inc.mk
else
all: link

View File

@ -9,7 +9,6 @@ This example should foremost give you an overview how to use the Makefile system
* First you must give your application a name, which is commonly the same as the name of the directory it resides in.
Then you can define a default BOARD for which the application was written.
By using e.g. `make BOARD=msba2` you can override the default board.
With `make buildtest` the application gets compiled for all supported boards.
* The variable `RIOTBASE` contains an absolute or relative path to the directory where you have checked out RIOT.
If your code resides in a subdirectory of RIOT, then you can use `$(CURDIR)` as it's done in here.

View File

@ -1,37 +0,0 @@
.PHONY: buildtest buildtest-indocker
BUILDTEST_MAKE_REDIRECT ?= >/dev/null 2>&1
buildtest:
@ \
RESULT=true ; \
for board in $(BOARDS); do \
if BOARD=$${board} $(MAKE) check-toolchain-supported > /dev/null 2>&1; then \
$(COLOR_ECHO) -n "Building for $$board ... " ; \
BOARD=$${board} RIOT_CI_BUILD=1 \
$(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 ; \
BOARD=$${board} $(MAKE) clean-intermediates >/dev/null 2>&1 || true; \
fi; \
done ; \
$${RESULT}
# Define 'buildtest-indocker' completely executed inside the container.
# It prevents starting one container per compilation which 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

@ -21,7 +21,6 @@ DOCKER ?= docker
# List of Docker-enabled make goals
export DOCKER_MAKECMDGOALS_POSSIBLE = \
all \
buildtest-indocker \
scan-build \
scan-build-analyze \
tests-% \

View File

@ -155,6 +155,5 @@ generate-Makefile.ci:
@$(RIOTTOOLS)/insufficient_memory/create_makefile.ci.sh
# Reset BOARDSDIR so unchanged for makefiles included after, for now only
# needed for buildtests.inc.mk
# Reset BOARDSDIR so unchanged for makefiles included after
BOARDDIR := $(BOARDDIR_GLOBAL)

View File

@ -1,33 +0,0 @@
ifneq (, $(filter buildtest info-concurrency, $(MAKECMDGOALS)))
ifeq (, $(strip $(NPROC)))
# Linux (utility program)
NPROC := $(shell nproc 2>/dev/null)
ifeq (, $(strip $(NPROC)))
# Linux (generic)
NPROC := $(shell grep -c ^processor /proc/cpuinfo 2>/dev/null)
endif
ifeq (, $(strip $(NPROC)))
# BSD (at least FreeBSD and Mac OSX)
NPROC := $(shell sysctl -n hw.ncpu 2>/dev/null)
endif
ifeq (, $(strip $(NPROC)))
# Fallback
NPROC := 1
endif
NPROC := $(shell echo $$(($(NPROC) + 1)))
ifneq (, $(NPROC_MAX))
NPROC := $(shell if [ $(NPROC) -gt $(NPROC_MAX) ]; then echo $(NPROC_MAX); else echo $(NPROC); fi)
endif
ifneq (, $(NPROC_MIN))
NPROC := $(shell if [ $(NPROC) -lt $(NPROC_MIN) ]; then echo $(NPROC_MIN); else echo $(NPROC); fi)
endif
endif
endif
.PHONY: info-concurrency
info-concurrency:
@echo "$(NPROC)"