Skip to content
Snippets Groups Projects
Commit 4c6e17b3 authored by Martine Lenders's avatar Martine Lenders
Browse files

unittests: make: Fix unittests for branch changes

Changing between branches in git typically leaves directories empty and
does not remove them. If you have different unittests in different
branches this leads to an error in building them, since the current
configuration expects a Makefile in all `tests-*` directory. This change
configures Make to search for a Makefile in `tests-*` rather than just
assuming that there is one.
parent 8503267e
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ else ifeq ($(OUTPUT),COMPILER) ...@@ -19,7 +19,7 @@ else ifeq ($(OUTPUT),COMPILER)
endif endif
ifeq (, $(filter tests-%, $(MAKECMDGOALS))) ifeq (, $(filter tests-%, $(MAKECMDGOALS)))
UNIT_TESTS := $(shell find -mindepth 1 -maxdepth 1 -type d -name 'tests-*' -printf '%f ') UNIT_TESTS := $(foreach d,$(wildcard tests-*/Makefile),$(shell dirname $(d)))
else else
UNIT_TESTS := $(filter tests-%, $(MAKECMDGOALS)) UNIT_TESTS := $(filter tests-%, $(MAKECMDGOALS))
endif endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment