From 4c6e17b39bc2ab087b3795e19be6b96397d96d67 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Mon, 8 Sep 2014 11:56:01 +0200 Subject: [PATCH] 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. --- tests/unittests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unittests/Makefile b/tests/unittests/Makefile index 728c3b5d8c..b3c97fc25d 100644 --- a/tests/unittests/Makefile +++ b/tests/unittests/Makefile @@ -19,7 +19,7 @@ else ifeq ($(OUTPUT),COMPILER) endif 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 UNIT_TESTS := $(filter tests-%, $(MAKECMDGOALS)) endif