From 0cbbd948c0ff1f946f51435e57686b417f1ebeae Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Wed, 11 Mar 2020 10:59:27 +0100 Subject: [PATCH] nvs: clean coverage files on rebuild Fixes errors reported by libgcov related to merging debug information. --- components/nvs_flash/test_nvs_host/Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/components/nvs_flash/test_nvs_host/Makefile b/components/nvs_flash/test_nvs_host/Makefile index 20c2966e24..68c2161f9a 100644 --- a/components/nvs_flash/test_nvs_host/Makefile +++ b/components/nvs_flash/test_nvs_host/Makefile @@ -39,7 +39,7 @@ COVERAGE_FILES = $(OBJ_FILES:.o=.gc*) $(OBJ_FILES): %.o: %.cpp -$(TEST_PROGRAM): $(OBJ_FILES) +$(TEST_PROGRAM): $(OBJ_FILES) clean-coverage $(MAKE) -C ../../mbedtls/mbedtls/ lib g++ $(LDFLAGS) -o $(TEST_PROGRAM) $(OBJ_FILES) ../../mbedtls/mbedtls/library/libmbedcrypto.a @@ -62,12 +62,14 @@ coverage_report: coverage.info genhtml coverage.info --output-directory coverage_report @echo "Coverage report is in coverage_report/index.html" -clean: - $(MAKE) -C ../../mbedtls/mbedtls/ clean - rm -f $(OBJ_FILES) $(TEST_PROGRAM) +clean-coverage: rm -f $(COVERAGE_FILES) *.gcov rm -rf coverage_report/ rm -f coverage.info + +clean: clean-coverage + $(MAKE) -C ../../mbedtls/mbedtls/ clean + rm -f $(OBJ_FILES) $(TEST_PROGRAM) rm -f ../nvs_partition_generator/partition_single_page.bin rm -f ../nvs_partition_generator/partition_multipage_blob.bin rm -f ../nvs_partition_generator/partition_encrypted.bin @@ -80,4 +82,4 @@ clean: -.PHONY: clean all test long-test +.PHONY: clean clean-coverage all test long-test