mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-20 20:56:01 -04:00
Merge branch 'bugfix/unit_test_build' into 'master'
build system: fix building tests specified via TEST_COMPONENTS See merge request !1219
This commit is contained in:
commit
aad24cb6c7
@ -147,17 +147,17 @@ export COMPONENTS
|
|||||||
# can use $(notdir x) to get the component name.
|
# can use $(notdir x) to get the component name.
|
||||||
COMPONENT_PATHS := $(foreach comp,$(COMPONENTS),$(firstword $(foreach cd,$(COMPONENT_DIRS),$(wildcard $(dir $(cd))$(comp) $(cd)/$(comp)))))
|
COMPONENT_PATHS := $(foreach comp,$(COMPONENTS),$(firstword $(foreach cd,$(COMPONENT_DIRS),$(wildcard $(dir $(cd))$(comp) $(cd)/$(comp)))))
|
||||||
|
|
||||||
# If TESTS_ALL set to 1, set TEST_COMPONENTS_LIST to all components
|
TEST_COMPONENTS ?=
|
||||||
ifdef TESTS_ALL
|
TESTS_ALL ?=
|
||||||
|
|
||||||
|
# If TESTS_ALL set to 1, set TEST_COMPONENTS_LIST to all components.
|
||||||
|
# Otherwise, use the list supplied in TEST_COMPONENTS.
|
||||||
ifeq ($(TESTS_ALL),1)
|
ifeq ($(TESTS_ALL),1)
|
||||||
TEST_COMPONENTS_LIST := $(COMPONENTS)
|
TEST_COMPONENTS_LIST := $(COMPONENTS)
|
||||||
else # TESTS_ALL not empty and not 1
|
else
|
||||||
# otherwise, use TEST_COMPONENTS
|
|
||||||
TEST_COMPONENTS_LIST := $(TEST_COMPONENTS)
|
TEST_COMPONENTS_LIST := $(TEST_COMPONENTS)
|
||||||
endif
|
endif
|
||||||
else # TESTS_ALL unset
|
|
||||||
TEST_COMPONENTS_LIST :=
|
|
||||||
endif
|
|
||||||
TEST_COMPONENT_PATHS := $(foreach comp,$(TEST_COMPONENTS_LIST),$(firstword $(foreach dir,$(COMPONENT_DIRS),$(wildcard $(dir)/$(comp)/test))))
|
TEST_COMPONENT_PATHS := $(foreach comp,$(TEST_COMPONENTS_LIST),$(firstword $(foreach dir,$(COMPONENT_DIRS),$(wildcard $(dir)/$(comp)/test))))
|
||||||
TEST_COMPONENT_NAMES := $(foreach comp,$(TEST_COMPONENT_PATHS),$(lastword $(subst /, ,$(dir $(comp))))_test)
|
TEST_COMPONENT_NAMES := $(foreach comp,$(TEST_COMPONENT_PATHS),$(lastword $(subst /, ,$(dir $(comp))))_test)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user