Просмотр исходного кода

components/nvs: run small number of tests as part of CI builds

Ivan Grokhotkov 9 лет назад
Родитель
Сommit
3df4130eb7
3 измененных файлов с 13 добавлено и 4 удалено
  1. 8 2
      .gitlab-ci.yml
  2. 4 1
      components/nvs_flash/test/Makefile
  3. 1 1
      components/nvs_flash/test/test_nvs.cpp

+ 8 - 2
.gitlab-ci.yml

@@ -1,9 +1,8 @@
 stages:
   - build
-#  - test
+  - test
   - deploy
 
-
 build_template_app:
   stage: build
   image: espressif/esp32-ci-env
@@ -18,6 +17,13 @@ build_template_app:
     - cd esp-idf-template
     - make all
 
+test_nvs_on_host:
+  stage: test
+  image: espressif/esp32-ci-env
+  script:
+    - cd components/nvs_flash/test
+    - make test
+
 push_master_to_github:
   stage: deploy
   only:

+ 4 - 1
components/nvs_flash/test/Makefile

@@ -37,7 +37,10 @@ $(OUTPUT_DIR):
 test: $(TEST_PROGRAM)
 	./$(TEST_PROGRAM)
 
-$(COVERAGE_FILES): $(TEST_PROGRAM) test
+long-test: $(TEST_PROGRAM)
+	./$(TEST_PROGRAM) [list],[enumtable],[spi_flash_emu],[nvs],[long]
+
+$(COVERAGE_FILES): $(TEST_PROGRAM) long-test
 
 coverage.info: $(COVERAGE_FILES)
 	find ../src/ -name "*.gcno" -exec gcov -r -pb {} +

+ 1 - 1
components/nvs_flash/test/test_nvs.cpp

@@ -735,7 +735,7 @@ TEST_CASE("monkey test", "[nvs][monkey]")
     s_perf << "Monkey test: nErase=" << emu.getEraseOps() << " nWrite=" << emu.getWriteOps() << std::endl;
 }
 
-TEST_CASE("test recovery from sudden poweroff", "[nvs][recovery]")
+TEST_CASE("test recovery from sudden poweroff", "[.][long][nvs][recovery][monkey]")
 {
     std::random_device rd;
     std::mt19937 gen(rd());