]> granicus.if.org Git - esp-idf/commitdiff
wear_levelling: run host side test in CI
authorIvan Grokhotkov <ivan@espressif.com>
Mon, 10 Apr 2017 13:41:19 +0000 (21:41 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Mon, 17 Apr 2017 03:01:18 +0000 (11:01 +0800)
.gitlab-ci.yml
components/wear_levelling/test_wl_host/Makefile

index 14c870267640d61e69b6374746d61ae81565b9de..562ebdb09ac15f2339e3449e62b8b88ff226ee10 100644 (file)
@@ -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
index 74303cd3269c18d732ef57501c3d1f3a8d09d5ee..e71187180c56b4eeae64ee933e2aa78e9855787c 100644 (file)
@@ -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)