]> granicus.if.org Git - esp-idf/commitdiff
make: look for TEST_COMPONENTS in all component directories
authorIvan Grokhotkov <ivan@espressif.com>
Wed, 1 Mar 2017 03:12:10 +0000 (11:12 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Wed, 1 Mar 2017 03:12:29 +0000 (11:12 +0800)
fixes https://github.com/espressif/esp-idf/issues/354

make/project.mk

index 04015a8a8c9f68761ee20716e7ce8ddba4ce57da..d5a72c5d1c7555f6ebc4dc9d7d2aa7f698f12282 100644 (file)
@@ -134,7 +134,7 @@ endif
 
 # If TEST_COMPONENTS is set, create variables for building unit tests
 ifdef TEST_COMPONENTS
-override TEST_COMPONENTS := $(foreach comp,$(TEST_COMPONENTS),$(wildcard $(IDF_PATH)/components/$(comp)/test))
+override TEST_COMPONENTS := $(foreach comp,$(TEST_COMPONENTS),$(firstword $(foreach dir,$(COMPONENT_DIRS),$(wildcard $(dir)/$(comp)/test))))
 TEST_COMPONENT_PATHS := $(TEST_COMPONENTS)
 TEST_COMPONENT_NAMES :=  $(foreach comp,$(TEST_COMPONENTS),$(lastword $(subst /, ,$(dir $(comp))))_test)
 endif