2018-01-25 16:24:37 +01:00
|
|
|
DEVELHELP ?= 0
|
2014-04-07 15:15:25 +02:00
|
|
|
include ../Makefile.tests_common
|
|
|
|
|
2017-04-15 01:15:10 +02:00
|
|
|
BOARD_INSUFFICIENT_MEMORY := airfy-beacon \
|
|
|
|
arduino-duemilanove \
|
|
|
|
arduino-mega2560 \
|
2017-02-28 17:55:56 +01:00
|
|
|
arduino-mkr1000 \
|
2017-05-23 10:46:06 +02:00
|
|
|
arduino-mkrfox1200 \
|
2017-05-23 10:26:13 +02:00
|
|
|
arduino-mkrzero \
|
2017-04-15 01:15:10 +02:00
|
|
|
arduino-uno \
|
|
|
|
arduino-zero \
|
2017-10-30 13:11:37 +01:00
|
|
|
avsextrem \
|
2017-04-24 09:35:06 +02:00
|
|
|
b-l072z-lrwan1 \
|
2017-10-12 19:09:53 +02:00
|
|
|
bluepill \
|
2017-04-15 01:15:10 +02:00
|
|
|
calliope-mini \
|
|
|
|
cc2538dk \
|
2017-09-20 10:59:37 +02:00
|
|
|
cc2650-launchpad \
|
2017-04-15 01:15:10 +02:00
|
|
|
cc2650stk \
|
|
|
|
chronos \
|
|
|
|
ek-lm4f120xl \
|
2017-11-05 21:53:18 +01:00
|
|
|
feather-m0 \
|
2017-04-15 01:15:10 +02:00
|
|
|
limifrog-v1 maple-mini \
|
|
|
|
mbed_lpc1768 \
|
2018-03-24 04:05:13 +01:00
|
|
|
mega-xplained \
|
2017-04-15 01:15:10 +02:00
|
|
|
microbit \
|
|
|
|
msb-430 \
|
|
|
|
msb-430h \
|
2018-03-14 17:55:20 +01:00
|
|
|
msba2 \
|
2017-04-15 01:15:10 +02:00
|
|
|
nrf51dongle \
|
|
|
|
nrf6310 \
|
|
|
|
nucleo32-f031 \
|
|
|
|
nucleo32-f042 \
|
|
|
|
nucleo32-f303 \
|
|
|
|
nucleo32-l031 \
|
|
|
|
nucleo32-l432 \
|
|
|
|
nucleo-f030 \
|
|
|
|
nucleo-f070 \
|
|
|
|
nucleo-f072 \
|
|
|
|
nucleo-f091 \
|
|
|
|
nucleo-f103 \
|
|
|
|
nucleo-f302 \
|
|
|
|
nucleo-f334 \
|
|
|
|
nucleo-f410 \
|
|
|
|
nucleo-l053 \
|
|
|
|
nucleo-l073 \
|
2017-04-03 13:08:23 +02:00
|
|
|
nz32-sc151 \
|
2017-04-15 01:15:10 +02:00
|
|
|
opencm904 \
|
|
|
|
openmote \
|
|
|
|
openmote-cc2538 \
|
|
|
|
pba-d-01-kw2x \
|
|
|
|
remote-pa \
|
|
|
|
remote-reva \
|
|
|
|
remote-revb \
|
|
|
|
saml21-xpro \
|
|
|
|
samd21-xpro \
|
|
|
|
samr21-xpro \
|
|
|
|
seeeduino_arch-pro \
|
|
|
|
slwstk6220a \
|
|
|
|
sodaq-autonomo \
|
2017-10-13 14:22:35 +02:00
|
|
|
sodaq-explorer \
|
2017-04-15 01:15:10 +02:00
|
|
|
spark-core \
|
|
|
|
stm32f0discovery \
|
|
|
|
stm32f3discovery \
|
2018-01-17 18:12:25 +01:00
|
|
|
teensy31 \
|
2017-04-15 01:15:10 +02:00
|
|
|
telosb \
|
|
|
|
waspmote-pro \
|
|
|
|
wsn430-v1_3b \
|
|
|
|
wsn430-v1_4 \
|
|
|
|
yunjia-nrf51822 z1
|
2014-07-14 21:40:04 +02:00
|
|
|
|
2014-04-07 15:15:25 +02:00
|
|
|
USEMODULE += embunit
|
|
|
|
|
2014-05-14 11:13:53 +02:00
|
|
|
ifeq (, $(filter tests-%, $(MAKECMDGOALS)))
|
2017-09-22 12:01:15 +02:00
|
|
|
# the $(dir) Makefile function leaves a trailing slash after the directory
|
|
|
|
# name, therefore we use patsubst instead.
|
|
|
|
UNIT_TESTS := $(patsubst %/Makefile,%,$(wildcard tests-*/Makefile))
|
2014-05-14 11:13:53 +02:00
|
|
|
else
|
2017-09-22 12:01:15 +02:00
|
|
|
UNIT_TESTS := $(filter tests-%, $(MAKECMDGOALS))
|
2014-05-14 11:13:53 +02:00
|
|
|
endif
|
2014-04-07 15:15:25 +02:00
|
|
|
|
2017-11-14 14:16:12 +01:00
|
|
|
ARM7_BOARDS := avsextrem \
|
|
|
|
msba2 \
|
|
|
|
#
|
2017-04-03 19:47:32 +02:00
|
|
|
DISABLE_TEST_FOR_ARM7 := tests-relic tests-cpp_%
|
2015-12-18 23:39:23 +01:00
|
|
|
|
2017-04-15 01:15:10 +02:00
|
|
|
ARM_CORTEX_M_BOARDS := airfy-beacon \
|
|
|
|
arduino-due \
|
2017-02-28 17:55:56 +01:00
|
|
|
arduino-mkr1000 \
|
2017-05-23 10:46:06 +02:00
|
|
|
arduino-mkrfox1200 \
|
2017-05-23 10:26:13 +02:00
|
|
|
arduino-mkrzero \
|
2017-04-15 01:15:10 +02:00
|
|
|
arduino-zero \
|
2017-04-24 09:35:06 +02:00
|
|
|
b-l072z-lrwan1 \
|
2017-11-14 14:16:12 +01:00
|
|
|
bluepill \
|
|
|
|
calliope-mini \
|
2017-04-15 01:15:10 +02:00
|
|
|
cc2538dk \
|
2017-11-14 14:16:12 +01:00
|
|
|
cc2650-launchpad \
|
|
|
|
cc2650stk \
|
2017-04-15 01:15:10 +02:00
|
|
|
ek-lm4f120xl \
|
|
|
|
f4vi1 \
|
2017-11-05 21:53:18 +01:00
|
|
|
feather-m0 \
|
2017-04-15 01:15:10 +02:00
|
|
|
fox \
|
2017-11-14 14:16:12 +01:00
|
|
|
frdm-k22f \
|
2017-04-15 01:15:10 +02:00
|
|
|
frdm-k64f \
|
2017-05-01 15:40:12 +02:00
|
|
|
frdm-kw41z \
|
2017-11-14 14:16:12 +01:00
|
|
|
iotlab-a8-m3 \
|
2017-04-15 01:15:10 +02:00
|
|
|
iotlab-m3 \
|
|
|
|
limifrog-v1 \
|
2017-11-14 14:16:12 +01:00
|
|
|
maple-mini \
|
2017-04-15 01:15:10 +02:00
|
|
|
mbed_lpc1768 \
|
2017-11-14 14:16:12 +01:00
|
|
|
microbit \
|
2017-04-15 01:15:10 +02:00
|
|
|
msbiot \
|
|
|
|
mulle \
|
|
|
|
nrf51dongle \
|
|
|
|
nrf52840dk \
|
2017-11-14 14:16:12 +01:00
|
|
|
nrf52dk \
|
2017-04-15 01:15:10 +02:00
|
|
|
nrf6310 \
|
2018-01-25 10:55:06 +01:00
|
|
|
nucleo-f207zg \
|
2017-04-15 01:15:10 +02:00
|
|
|
nucleo144-f303 \
|
2017-03-17 09:15:08 +01:00
|
|
|
nucleo144-f412 \
|
2017-11-14 14:16:12 +01:00
|
|
|
nucleo144-f413 \
|
2017-04-15 01:15:10 +02:00
|
|
|
nucleo144-f429 \
|
|
|
|
nucleo144-f446 \
|
2017-11-14 14:16:12 +01:00
|
|
|
nucleo144-f722 \
|
|
|
|
nucleo144-f746 \
|
|
|
|
nucleo144-f767 \
|
2017-04-15 01:15:10 +02:00
|
|
|
nucleo32-f031 \
|
2017-11-14 14:16:12 +01:00
|
|
|
nucleo32-f042 \
|
2017-04-15 01:15:10 +02:00
|
|
|
nucleo32-f303 \
|
|
|
|
nucleo32-l031 \
|
|
|
|
nucleo32-l432 \
|
|
|
|
nucleo-f030 \
|
|
|
|
nucleo-f070 \
|
|
|
|
nucleo-f072 \
|
|
|
|
nucleo-f091 \
|
2017-11-14 14:16:12 +01:00
|
|
|
nucleo-f103 \
|
2017-04-15 01:15:10 +02:00
|
|
|
nucleo-f302 \
|
|
|
|
nucleo-f303 \
|
|
|
|
nucleo-f334 \
|
|
|
|
nucleo-f401 \
|
|
|
|
nucleo-f410 \
|
|
|
|
nucleo-f411 \
|
2017-11-14 14:16:12 +01:00
|
|
|
nucleo-f446 \
|
2017-04-15 01:15:10 +02:00
|
|
|
nucleo-l053 \
|
|
|
|
nucleo-l073 \
|
2017-07-17 18:24:15 +02:00
|
|
|
nucleo-l152 \
|
2017-04-15 01:15:10 +02:00
|
|
|
nucleo-l476 \
|
2017-04-03 13:08:23 +02:00
|
|
|
nz32-sc151 \
|
2017-04-15 01:15:10 +02:00
|
|
|
opencm904 \
|
|
|
|
openmote-cc2538 \
|
|
|
|
pba-d-01-kw2x \
|
2017-11-14 14:16:12 +01:00
|
|
|
remote-pa \
|
|
|
|
remote-reva \
|
|
|
|
remote-revb \
|
2017-04-15 01:15:10 +02:00
|
|
|
samd21-xpro \
|
|
|
|
saml21-xpro \
|
|
|
|
samr21-xpro \
|
2017-11-14 14:16:12 +01:00
|
|
|
seeeduino_arch-pro \
|
|
|
|
sltb001a \
|
2017-04-15 01:15:10 +02:00
|
|
|
slwstk6220a \
|
|
|
|
sodaq-autonomo \
|
2017-10-13 14:22:35 +02:00
|
|
|
sodaq-explorer \
|
2017-04-15 01:15:10 +02:00
|
|
|
spark-core \
|
|
|
|
stm32f0discovery \
|
|
|
|
stm32f3discovery \
|
|
|
|
stm32f4discovery \
|
2017-11-14 14:16:12 +01:00
|
|
|
stm32f7discovery \
|
2017-04-15 01:15:10 +02:00
|
|
|
udoo \
|
2017-11-14 14:16:12 +01:00
|
|
|
yunjia-nrf51822 \
|
|
|
|
#
|
2015-12-18 23:39:23 +01:00
|
|
|
DISABLE_TEST_FOR_ARM_CORTEX_M := tests-relic
|
|
|
|
|
2017-11-14 14:16:12 +01:00
|
|
|
AVR_BOARDS := arduino-duemilanove \
|
|
|
|
arduino-mega2560 \
|
|
|
|
arduino-uno \
|
|
|
|
waspmote-pro \
|
|
|
|
#
|
2017-04-03 19:47:32 +02:00
|
|
|
DISABLE_TEST_FOR_AVR := tests-relic tests-cpp_%
|
2015-12-02 16:11:13 +01:00
|
|
|
|
2017-11-14 14:16:12 +01:00
|
|
|
MSP430_BOARDS := chronos \
|
|
|
|
msb-430 \
|
|
|
|
msb-430h \
|
|
|
|
telosb \
|
|
|
|
wsn430-v1_3b \
|
|
|
|
wsn430-v1_4 \
|
|
|
|
z1 \
|
|
|
|
#
|
2017-04-03 19:47:32 +02:00
|
|
|
DISABLE_TEST_FOR_MSP430 := tests-relic tests-spiffs tests-cpp_%
|
2015-12-02 16:11:13 +01:00
|
|
|
|
2015-12-18 23:39:23 +01:00
|
|
|
ifneq (, $(filter $(ARM7_BOARDS), $(BOARD)))
|
2017-09-22 12:01:15 +02:00
|
|
|
UNIT_TESTS := $(filter-out $(DISABLE_TEST_FOR_ARM7), $(UNIT_TESTS))
|
2015-12-18 23:39:23 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (, $(filter $(ARM_CORTEX_M_BOARDS), $(BOARD)))
|
2017-09-22 12:01:15 +02:00
|
|
|
UNIT_TESTS := $(filter-out $(DISABLE_TEST_FOR_ARM_CORTEX_M), $(UNIT_TESTS))
|
2015-12-18 23:39:23 +01:00
|
|
|
endif
|
|
|
|
|
2015-12-02 16:11:13 +01:00
|
|
|
ifneq (, $(filter $(AVR_BOARDS), $(BOARD)))
|
2017-09-22 12:01:15 +02:00
|
|
|
UNIT_TESTS := $(filter-out $(DISABLE_TEST_FOR_AVR), $(UNIT_TESTS))
|
2015-12-02 16:11:13 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (, $(filter $(MSP430_BOARDS), $(BOARD)))
|
2017-09-22 12:01:15 +02:00
|
|
|
UNIT_TESTS := $(filter-out $(DISABLE_TEST_FOR_MSP430), $(UNIT_TESTS))
|
2015-12-02 16:11:13 +01:00
|
|
|
endif
|
|
|
|
|
2017-04-03 19:47:32 +02:00
|
|
|
ifneq (,$(filter tests-cpp_%, $(UNIT_TESTS)))
|
2017-09-22 12:01:15 +02:00
|
|
|
# We need to tell the build system to use the C++ compiler for linking
|
|
|
|
export FEATURES_REQUIRED += cpp
|
|
|
|
export CPPMIX := 1
|
2017-04-03 19:47:32 +02:00
|
|
|
endif
|
|
|
|
|
2018-03-16 15:48:03 +01:00
|
|
|
ifneq (, $(filter $(AVR_BOARDS), $(BOARD)))
|
|
|
|
LARGE_STACK_TESTS += tests-qDSA
|
|
|
|
endif
|
|
|
|
|
|
|
|
LARGE_STACK_TESTS += tests-tweetnacl
|
|
|
|
ifneq (,$(filter $(LARGE_STACK_TESTS), $(UNIT_TESTS)))
|
|
|
|
CFLAGS += -DTHREAD_STACKSIZE_MAIN=\(4*THREAD_STACKSIZE_DEFAULT+THREAD_EXTRA_STACKSIZE_PRINTF\)
|
|
|
|
endif
|
|
|
|
|
2014-08-21 20:45:36 +02:00
|
|
|
DISABLE_MODULE += auto_init
|
|
|
|
|
2014-05-18 16:17:02 +02:00
|
|
|
# Pull in `Makefile.include`s from the test suites:
|
|
|
|
-include $(UNIT_TESTS:%=$(RIOTBASE)/tests/unittests/%/Makefile.include)
|
|
|
|
|
2014-06-18 11:21:05 +02:00
|
|
|
DIRS += $(UNIT_TESTS)
|
2016-10-18 23:27:59 +02:00
|
|
|
BASELIBS += $(UNIT_TESTS:%=$(BINDIR)/%.a)
|
2014-05-14 11:13:53 +02:00
|
|
|
|
2015-03-20 19:57:08 +01:00
|
|
|
INCLUDES += -I$(RIOTBASE)/tests/unittests/common
|
2014-05-14 11:13:53 +02:00
|
|
|
|
2015-03-20 19:57:08 +01:00
|
|
|
include $(RIOTBASE)/Makefile.include
|
2014-08-08 19:21:03 +02:00
|
|
|
|
2016-07-05 16:06:33 +02:00
|
|
|
.PHONY: $(UNIT_TESTS)
|
2014-08-27 14:04:22 +02:00
|
|
|
|
2016-07-05 16:06:33 +02:00
|
|
|
all:
|
2014-08-27 14:04:22 +02:00
|
|
|
|
2016-07-05 16:06:33 +02:00
|
|
|
$(UNIT_TESTS): all
|
2014-05-14 11:13:53 +02:00
|
|
|
|
2014-05-14 12:21:20 +02:00
|
|
|
charCOMMA := ,
|
|
|
|
|
|
|
|
ifeq (, $(UNIT_TESTS))
|
2017-09-22 12:01:15 +02:00
|
|
|
CFLAGS += -DNO_TEST_SUITES
|
|
|
|
$(warning There was no test suite specified!)
|
2014-05-14 12:21:20 +02:00
|
|
|
else
|
2017-09-22 12:01:15 +02:00
|
|
|
CFLAGS += -DTEST_SUITES='$(subst $() $(),$(charCOMMA),$(UNIT_TESTS:tests-%=%))'
|
2014-05-14 12:21:20 +02:00
|
|
|
endif
|
2014-05-29 04:40:43 +02:00
|
|
|
|
|
|
|
test:
|
2015-07-03 14:50:52 +02:00
|
|
|
./tests/01-run.py
|