mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
murdock: refactor handling of TEST_ON_CI_WHITELIST
Refactor the handling to use a variable to store if a test is enabled. Add a 'test-on-ci-enabled' target that test if the test on ci is enabled. This is a first commit before changing the behavior.
This commit is contained in:
parent
56085b10a0
commit
5d2c57f858
@ -19,16 +19,31 @@ test-murdock:
|
||||
"$(BOARD):$(TOOLCHAIN)" \
|
||||
$(FLASHFILE)
|
||||
|
||||
# don't whitelist tests if there's no binary
|
||||
ifeq (1,$(RIOTNOLINK))
|
||||
TEST_ON_CI_WHITELIST:=
|
||||
endif
|
||||
|
||||
# create $(BINDIR)/.test file only if BOARD is in $(TEST_ON_CI_WHITELIST)
|
||||
# Control running tests on boards during the CI tests.
|
||||
#
|
||||
# Testing is enabled if all the following conditions are met:
|
||||
#
|
||||
# * the board is whitelisted
|
||||
# * the board has enough memory and the executable is being linked
|
||||
#
|
||||
# TEST_ON_CI_WHITELIST can be empty, a board list or 'all'
|
||||
|
||||
TEST_ON_CI_WHITELIST ?=
|
||||
TEST_ON_BOARD_ENABLED ?= $(filter $(TEST_ON_CI_WHITELIST:all=%),$(BOARD))
|
||||
|
||||
TEST_ON_CI_ENABLED ?= $(if $(RIOTNOLINK),,$(TEST_ON_BOARD_ENABLED))
|
||||
|
||||
.PHONY: test-on-ci-enabled
|
||||
test-on-ci-enabled:
|
||||
$(Q)test -n "$(TEST_ON_CI_ENABLED)"
|
||||
|
||||
|
||||
# create $(BINDIR)/.test file only if the test is enabled for this board
|
||||
.PHONY: $(BINDIR)/.test
|
||||
link: $(BINDIR)/.test
|
||||
$(BINDIR)/.test: $(filter clean, $(MAKECMDGOALS))
|
||||
ifneq (,$(filter $(BOARD) all, $(TEST_ON_CI_WHITELIST)))
|
||||
ifneq (,$(TEST_ON_CI_ENABLED))
|
||||
$(Q)mkdir -p $(BINDIR)
|
||||
$(Q)touch $@
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user