2017-03-24 14:40:38 +01:00
|
|
|
#
|
|
|
|
# This file contains helper targets used by the CI.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# This target will run "make test" on the CI cluster.
|
|
|
|
#
|
|
|
|
# In order to work, these requirements must be fulfilled:
|
|
|
|
# - DWQ_REPO and DWQ_COMMIT are set correctly
|
|
|
|
# - the user has set up autossh & proper authentication for connecting to the CI
|
|
|
|
# (intended to be used by CI only for now)
|
2019-06-13 16:21:27 +02:00
|
|
|
#
|
|
|
|
# By default, $(FLASHFILE) is copied to the test worker along with the job.
|
|
|
|
# If the test needs any extra files, they can be added to the TEST_EXTRA_FILES
|
|
|
|
# variable. They will also be sent to the test worker.
|
|
|
|
# Note: *any TEST_EXTRA_FILES has to reside in ${BINDIR}*.
|
2017-03-24 14:40:38 +01:00
|
|
|
test-murdock:
|
2018-03-19 11:31:52 +01:00
|
|
|
cd $(RIOTBASE) && \
|
2017-03-24 14:40:38 +01:00
|
|
|
./.murdock test_job \
|
2018-03-19 11:31:52 +01:00
|
|
|
$$(realpath --relative-to $(RIOTBASE) $(APPDIR)) \
|
2018-06-22 10:31:44 +02:00
|
|
|
"$(BOARD):$(TOOLCHAIN)" \
|
2019-06-13 16:21:27 +02:00
|
|
|
$(FLASHFILE) $(TEST_EXTRA_FILES)
|
2017-03-24 14:40:38 +01:00
|
|
|
|
|
|
|
|
2019-06-25 18:41:52 +02:00
|
|
|
# Control running tests on boards during the CI tests.
|
|
|
|
#
|
|
|
|
# Testing is enabled if all the following conditions are met:
|
|
|
|
#
|
2019-06-12 15:18:06 +02:00
|
|
|
# * the board is whitelisted (by default all are enabled)
|
2019-06-25 18:45:59 +02:00
|
|
|
# * the board is not blacklisted (by default none)
|
2019-06-25 18:41:52 +02:00
|
|
|
# * the board has enough memory and the executable is being linked
|
2019-06-12 15:15:40 +02:00
|
|
|
# * a test is present
|
2019-06-25 18:41:52 +02:00
|
|
|
#
|
2019-06-25 18:45:59 +02:00
|
|
|
# TEST_ON_CI_WHITELIST and TEST_ON_CI_BLACKLIST can be empty, a board list or 'all'
|
|
|
|
#
|
|
|
|
# Prefer blacklisting boards that fail to whitelisting the ones that work.
|
|
|
|
# It will help tracking what is failing.
|
|
|
|
#
|
|
|
|
# Disabling a test in some case must be justified to keep track of the reason.
|
2019-06-25 18:41:52 +02:00
|
|
|
|
2019-06-12 15:18:06 +02:00
|
|
|
TEST_ON_CI_WHITELIST ?= all
|
2019-06-25 18:45:59 +02:00
|
|
|
TEST_ON_CI_BLACKLIST ?=
|
|
|
|
TEST_ON_BOARD_ENABLED ?= $(filter-out $(TEST_ON_CI_BLACKLIST:all=%),$(filter $(TEST_ON_CI_WHITELIST:all=%),$(BOARD)))
|
2019-06-25 18:41:52 +02:00
|
|
|
|
2019-06-12 15:15:40 +02:00
|
|
|
TEST_ON_CI_ENABLED ?= $(if $(RIOTNOLINK),,$(if $(TESTS),$(TEST_ON_BOARD_ENABLED)))
|
2019-06-25 18:41:52 +02:00
|
|
|
|
|
|
|
.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
|
2017-03-24 14:40:38 +01:00
|
|
|
.PHONY: $(BINDIR)/.test
|
|
|
|
link: $(BINDIR)/.test
|
|
|
|
$(BINDIR)/.test: $(filter clean, $(MAKECMDGOALS))
|
2019-06-25 18:41:52 +02:00
|
|
|
ifneq (,$(TEST_ON_CI_ENABLED))
|
2017-03-24 14:40:38 +01:00
|
|
|
$(Q)mkdir -p $(BINDIR)
|
|
|
|
$(Q)touch $@
|
|
|
|
else
|
|
|
|
$(Q)rm -f $@
|
|
|
|
endif
|