diff --git a/tests/unittests/Makefile b/tests/unittests/Makefile index 4256c1328b..8f8a38849b 100644 --- a/tests/unittests/Makefile +++ b/tests/unittests/Makefile @@ -19,7 +19,9 @@ BOARD_INSUFFICIENT_MEMORY := airfy-beacon arduino-duemilanove arduino-mega2560 \ USEMODULE += embunit ifeq (, $(filter tests-%, $(MAKECMDGOALS))) - UNIT_TESTS := $(foreach d,$(wildcard tests-*/Makefile),$(shell dirname $(d))) + # 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