nvs: deinit NVS in nvs_stats unit test
This fixes the failure when this test runs after another test which leaves NVS initialized.
This commit is contained in:
parent
d0d314d8f8
commit
fa3bd16d75
1 changed files with 14 additions and 7 deletions
|
@ -1267,16 +1267,10 @@ TEST_CASE("nvs page selection takes into account free entries also not just eras
|
|||
nvs_close(handle);
|
||||
}
|
||||
|
||||
TEST_CASE("dump all performance data", "[nvs]")
|
||||
{
|
||||
std::cout << "====================" << std::endl << "Dumping benchmarks" << std::endl;
|
||||
std::cout << s_perf.str() << std::endl;
|
||||
std::cout << "====================" << std::endl;
|
||||
}
|
||||
|
||||
TEST_CASE("calculate used and free space", "[nvs]")
|
||||
{
|
||||
SpiFlashEmulator emu(6);
|
||||
nvs_flash_deinit();
|
||||
TEST_ESP_ERR(nvs_get_stats(NULL, NULL), ESP_ERR_INVALID_ARG);
|
||||
nvs_stats_t stat1;
|
||||
nvs_stats_t stat2;
|
||||
|
@ -1407,3 +1401,16 @@ TEST_CASE("calculate used and free space", "[nvs]")
|
|||
|
||||
nvs_close(handle_3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Add new tests above */
|
||||
/* This test has to be the final one */
|
||||
|
||||
TEST_CASE("dump all performance data", "[nvs]")
|
||||
{
|
||||
std::cout << "====================" << std::endl << "Dumping benchmarks" << std::endl;
|
||||
std::cout << s_perf.str() << std::endl;
|
||||
std::cout << "====================" << std::endl;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue