1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:32:46 +01:00

tests/unittests: allow passing UNIT_TESTS via env

This commit is contained in:
Kaspar Schleiser 2023-05-02 13:48:08 +02:00
parent 8573faba5c
commit bf768cbccb

View File

@ -3,12 +3,14 @@ include ../Makefile.tests_common
USEMODULE += embunit
ifeq (, $(filter tests-%, $(MAKECMDGOALS)))
# the $(dir) Makefile function leaves a trailing slash after the directory
# name, therefore we use patsubst instead.
UNIT_TESTS := $(patsubst %/Makefile,%,$(wildcard tests-*/Makefile))
else
UNIT_TESTS := $(filter tests-%, $(MAKECMDGOALS))
ifeq (, $(UNIT_TESTS))
ifeq (, $(filter tests-%, $(MAKECMDGOALS)))
# the $(dir) Makefile function leaves a trailing slash after the directory
# name, therefore we use patsubst instead.
UNIT_TESTS := $(patsubst %/Makefile,%,$(wildcard tests-*/Makefile))
else
UNIT_TESTS := $(filter tests-%, $(MAKECMDGOALS))
endif
endif
DISABLE_MODULE += auto_init auto_init_%