From 3df4130eb7554027282f2e202a0e76ed95db301e Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 23 Aug 2016 12:54:09 +0800 Subject: [PATCH] components/nvs: run small number of tests as part of CI builds --- .gitlab-ci.yml | 10 ++++++++-- components/nvs_flash/test/Makefile | 5 ++++- components/nvs_flash/test/test_nvs.cpp | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c7ef559ada..3f23ccc089 100644 --- a/.gitlab-ci.yml +++ b/.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: diff --git a/components/nvs_flash/test/Makefile b/components/nvs_flash/test/Makefile index 8fa7b3efe3..0b4de9c6b2 100644 --- a/components/nvs_flash/test/Makefile +++ b/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 {} + diff --git a/components/nvs_flash/test/test_nvs.cpp b/components/nvs_flash/test/test_nvs.cpp index beaa79e816..c137d9c6cc 100644 --- a/components/nvs_flash/test/test_nvs.cpp +++ b/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());