diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14c870267..562ebdb09 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -151,6 +151,18 @@ test_nvs_on_host: - cd components/nvs_flash/test_nvs_host - make test +test_wl_on_host: + stage: test + image: $CI_DOCKER_REGISTRY/esp32-ci-env + tags: + - wl_host_test + artifacts: + paths: + - components/wear_levelling/test_wl_host/coverage_report.zip + script: + - cd components/wear_levelling/test_wl_host + - make test + test_build_system: stage: test image: $CI_DOCKER_REGISTRY/esp32-ci-env diff --git a/components/wear_levelling/test_wl_host/Makefile b/components/wear_levelling/test_wl_host/Makefile index 74303cd32..e71187180 100644 --- a/components/wear_levelling/test_wl_host/Makefile +++ b/components/wear_levelling/test_wl_host/Makefile @@ -20,16 +20,19 @@ INCLUDE_FLAGS = $(addprefix -I,\ ../include \ ../private_include \ ../../esp32/include \ + ../../soc/esp32/include \ ../../log/include \ ../../spi_flash/include \ ../../nvs_flash/test_nvs_host \ ../../../tools/catch \ ) +GCOV ?= gcov + CPPFLAGS += $(INCLUDE_FLAGS) -D CONFIG_LOG_DEFAULT_LEVEL CFLAGS += -fprofile-arcs -ftest-coverage CXXFLAGS += -std=c++11 -Wall -Werror -fprofile-arcs -ftest-coverage -LDFLAGS += -lstdc++ -Wall -fprofile-arcs -ftest-coverage +LDFLAGS += -lstdc++ -fprofile-arcs -ftest-coverage OBJ_FILES = $(SOURCE_FILES:.cpp=.o) @@ -38,7 +41,7 @@ COVERAGE_FILES = $(OBJ_FILES:.o=.gc*) $(OBJ_FILES): %.o: %.cpp $(TEST_PROGRAM): $(OBJ_FILES) - $(LD) $(LDFLAGS) -o $(TEST_PROGRAM) $(OBJ_FILES) + g++ $(LDFLAGS) -o $(TEST_PROGRAM) $(OBJ_FILES) $(OUTPUT_DIR): mkdir -p $(OUTPUT_DIR)