mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/make_test_components' into 'master'
make: don’t override TEST_COMPONENTS When idf_monitor is launched from make, it gets modified `TEST_COMPONENTS` variable which contains full paths to the test components instead of the names. This causes `TEST_COMPONENT_PATHS` to be empty and the unit test app gets built without any test components. This change introduces an internal `TEST_COMPONENTS_LIST` variable which gets set either from `COMPONENTS` if `TESTS_ALL` is 1, or from `TEST_COMOPONENTS` otherwise. Bootloader makefile is also fixed to avoid propagating `TESTS_ALL` to the bootloader build step. See merge request !569
This commit is contained in:
commit
a9ed6d5a24
@ -23,7 +23,7 @@ BOOTLOADER_OFFSET := 0x1000
|
|||||||
|
|
||||||
# Custom recursive make for bootloader sub-project
|
# Custom recursive make for bootloader sub-project
|
||||||
BOOTLOADER_MAKE=+$(MAKE) -C $(BOOTLOADER_COMPONENT_PATH)/src \
|
BOOTLOADER_MAKE=+$(MAKE) -C $(BOOTLOADER_COMPONENT_PATH)/src \
|
||||||
V=$(V) BUILD_DIR_BASE=$(BOOTLOADER_BUILD_DIR) TEST_COMPONENTS=
|
V=$(V) BUILD_DIR_BASE=$(BOOTLOADER_BUILD_DIR) TEST_COMPONENTS= TESTS_ALL=
|
||||||
|
|
||||||
.PHONY: bootloader-clean bootloader-flash bootloader $(BOOTLOADER_BIN)
|
.PHONY: bootloader-clean bootloader-flash bootloader $(BOOTLOADER_BIN)
|
||||||
|
|
||||||
|
@ -127,17 +127,16 @@ COMPONENT_PATHS += $(abspath $(SRCDIRS))
|
|||||||
# A component is buildable if it has a component.mk makefile in it
|
# A component is buildable if it has a component.mk makefile in it
|
||||||
COMPONENT_PATHS_BUILDABLE := $(foreach cp,$(COMPONENT_PATHS),$(if $(wildcard $(cp)/component.mk),$(cp)))
|
COMPONENT_PATHS_BUILDABLE := $(foreach cp,$(COMPONENT_PATHS),$(if $(wildcard $(cp)/component.mk),$(cp)))
|
||||||
|
|
||||||
# If TESTS_ALL set to 1, set TEST_COMPONENTS to all components
|
# If TESTS_ALL set to 1, set TEST_COMPONENTS_LIST to all components
|
||||||
ifeq ($(TESTS_ALL),1)
|
ifeq ($(TESTS_ALL),1)
|
||||||
TEST_COMPONENTS := $(COMPONENTS)
|
TEST_COMPONENTS_LIST := $(COMPONENTS)
|
||||||
|
else
|
||||||
|
# otherwise, use TEST_COMPONENTS
|
||||||
|
TEST_COMPONENTS_LIST := $(TEST_COMPONENTS)
|
||||||
endif
|
endif
|
||||||
|
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)
|
||||||
|
|
||||||
# If TEST_COMPONENTS is set, create variables for building unit tests
|
|
||||||
ifdef TEST_COMPONENTS
|
|
||||||
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
|
|
||||||
|
|
||||||
# Initialise project-wide variables which can be added to by
|
# Initialise project-wide variables which can be added to by
|
||||||
# each component.
|
# each component.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user