2017-03-24 14:40:38 +01:00
|
|
|
#
|
|
|
|
# This file contains helper targets used by the CI.
|
|
|
|
#
|
|
|
|
|
2019-03-01 16:11:01 +01:00
|
|
|
# (HACK) get actual flash binary from FFLAGS if not defined.
|
|
|
|
FLASHFILE ?= $(filter $(HEXFILE) $(ELFFILE:.elf=.bin) $(ELFFILE),$(FFLAGS))
|
2017-03-24 14:40:38 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# 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)
|
|
|
|
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)" \
|
2017-03-24 14:40:38 +01:00
|
|
|
$(FLASHFILE)
|
|
|
|
|
|
|
|
|
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:
|
|
|
|
#
|
|
|
|
# * 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
|
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
|