mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ci(sdspi): clean up newlib memory, reset between tests
Two changes to make the tests less susceptible to random failures: - Free up newlib memory to not have false-positive memory leaks due to lazy allocations in reent structure - Reset between tests, so that one failing test doesn't cause subsequent tests to fail Both changes are already applied to esp_driver_sdmmc test app.
This commit is contained in:
parent
f355ecac40
commit
30abe85a25
@ -13,11 +13,13 @@
|
||||
|
||||
void setUp(void)
|
||||
{
|
||||
printf("%s", ""); /* sneakily lazy-allocate the reent structure for this test task */
|
||||
unity_utils_record_free_mem();
|
||||
}
|
||||
|
||||
void tearDown(void)
|
||||
{
|
||||
esp_reent_cleanup();
|
||||
unity_utils_evaluate_leaks_direct(TEST_MEMORY_LEAK_THRESHOLD);
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
from pytest_embedded_idf import IdfDut
|
||||
|
||||
|
||||
def test_sdspi(dut: IdfDut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
dut.run_all_single_board_cases(reset=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user