mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 04:34:31 +02:00
nvs: minor host test fixes
Fixes the tests to pass when some files already exist. Fixes clean target. Moves CONFIG_NVS_ENCRYPTION definition into sdkconfig.h.
This commit is contained in:
@@ -21,7 +21,7 @@ SOURCE_FILES = \
|
||||
crc.cpp \
|
||||
main.cpp
|
||||
|
||||
CPPFLAGS += -I../include -I../src -I./ -I../../esp_common/include -I../../esp32/include -I ../../mbedtls/mbedtls/include -I ../../spi_flash/include -I ../../../tools/catch -fprofile-arcs -ftest-coverage -DCONFIG_NVS_ENCRYPTION
|
||||
CPPFLAGS += -I../include -I../src -I./ -I../../esp_common/include -I../../esp32/include -I ../../mbedtls/mbedtls/include -I ../../spi_flash/include -I ../../soc/include -I ../../../tools/catch -fprofile-arcs -ftest-coverage
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
CXXFLAGS += -std=c++11 -Wall -Werror
|
||||
LDFLAGS += -lstdc++ -Wall -fprofile-arcs -ftest-coverage
|
||||
@@ -61,10 +61,10 @@ clean:
|
||||
rm -f $(COVERAGE_FILES) *.gcov
|
||||
rm -rf coverage_report/
|
||||
rm -f coverage.info
|
||||
rm ../nvs_partition_generator/partition_single_page.bin
|
||||
rm ../nvs_partition_generator/partition_multipage_blob.bin
|
||||
rm ../nvs_partition_generator/partition_encrypted.bin
|
||||
rm ../nvs_partition_generator/partition_encrypted_using_keygen.bin
|
||||
rm ../nvs_partition_generator/partition_encrypted_using_keyfile.bin
|
||||
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
|
||||
rm -f ../nvs_partition_generator/partition_encrypted_using_keygen.bin
|
||||
rm -f ../nvs_partition_generator/partition_encrypted_using_keyfile.bin
|
||||
|
||||
.PHONY: clean all test long-test
|
||||
|
@@ -1,2 +1,3 @@
|
||||
#define CONFIG_NVS_ENCRYPTION 1
|
||||
//currently use the legacy implementation, since the stubs for new HAL are not done yet
|
||||
#define CONFIG_SPI_FLASH_USE_LEGACY_IMPL 1
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#include "catch.hpp"
|
||||
#include "nvs.hpp"
|
||||
#include "nvs_test_api.h"
|
||||
#include "sdkconfig.h"
|
||||
#ifdef CONFIG_NVS_ENCRYPTION
|
||||
#include "nvs_encr.hpp"
|
||||
#endif
|
||||
@@ -2470,10 +2471,10 @@ TEST_CASE("check and read data from partition generated via manufacturing utilit
|
||||
if (childpid == 0) {
|
||||
exit(execlp("bash", "bash",
|
||||
"-c",
|
||||
"rm -rf ../../../tools/mass_mfg/host_test | \
|
||||
cp -rf ../../../tools/mass_mfg/testdata mfg_testdata | \
|
||||
cp -rf ../nvs_partition_generator/testdata . | \
|
||||
mkdir -p ../../../tools/mass_mfg/host_test",NULL));
|
||||
"rm -rf ../../../tools/mass_mfg/host_test && \
|
||||
cp -rf ../../../tools/mass_mfg/testdata mfg_testdata && \
|
||||
cp -rf ../nvs_partition_generator/testdata . && \
|
||||
mkdir -p ../../../tools/mass_mfg/host_test", NULL));
|
||||
} else {
|
||||
CHECK(childpid > 0);
|
||||
waitpid(childpid, &status, 0);
|
||||
|
Reference in New Issue
Block a user