diff --git a/components/heap/test_apps/main/CMakeLists.txt b/components/heap/test_apps/main/CMakeLists.txt index 96118e2e7b..25d6596721 100644 --- a/components/heap/test_apps/main/CMakeLists.txt +++ b/components/heap/test_apps/main/CMakeLists.txt @@ -4,7 +4,6 @@ set(src_test "test_app_main.c" "test_corruption_check.c" "test_diram.c" "test_heap_trace.c" - "test_leak.c" "test_malloc_caps.c" "test_malloc.c" "test_realloc.c" diff --git a/components/heap/test_apps/main/test_leak.c b/tools/unit-test-app/components/test_utils/test/leak_test.c similarity index 63% rename from components/heap/test_apps/main/test_leak.c rename to tools/unit-test-app/components/test_utils/test/leak_test.c index 46f2082ecc..46b783507c 100644 --- a/components/heap/test_apps/main/test_leak.c +++ b/tools/unit-test-app/components/test_utils/test/leak_test.c @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Unlicense OR CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ /* Tests for a leak tag @@ -21,23 +21,23 @@ static char* check_calloc(int size) return arr; } -TEST_CASE("Check for leaks (no leak)", "[heap]") +TEST_CASE("Check for leaks (no leak)", "[test_utils]") { char *arr = check_calloc(1000); free(arr); } -TEST_CASE("Check for leaks (leak)", "[heap][ignore]") +TEST_CASE("Check for leaks (leak)", "[test_utils][ignore]") { check_calloc(1000); } -TEST_CASE("Not check for leaks", "[heap][leaks]") +TEST_CASE("Not check for leaks", "[test_utils][leaks]") { check_calloc(1000); } -TEST_CASE("Set a leak level = 7016", "[heap][leaks=7016]") +TEST_CASE("Set a leak level = 7016", "[test_utils][leaks=7016]") { check_calloc(7000); } @@ -47,9 +47,9 @@ static void test_fn(void) check_calloc(1000); } -TEST_CASE_MULTIPLE_STAGES("Not check for leaks in MULTIPLE_STAGES mode", "[heap][leaks]", test_fn, test_fn, test_fn); +TEST_CASE_MULTIPLE_STAGES("Not check for leaks in MULTIPLE_STAGES mode", "[test_utils][leaks]", test_fn, test_fn, test_fn); -TEST_CASE_MULTIPLE_STAGES("Check for leaks in MULTIPLE_STAGES mode (leak)", "[heap][ignore]", test_fn, test_fn, test_fn); +TEST_CASE_MULTIPLE_STAGES("Check for leaks in MULTIPLE_STAGES mode (leak)", "[test_utils][ignore]", test_fn, test_fn, test_fn); static void test_fn2(void) { @@ -62,4 +62,4 @@ static void test_fn3(void) check_calloc(1000); } -TEST_CASE_MULTIPLE_STAGES("Check for leaks in MULTIPLE_STAGES mode (manual reset)", "[heap][leaks][reset=SW_CPU_RESET, SW_CPU_RESET]", test_fn2, test_fn2, test_fn3); +TEST_CASE_MULTIPLE_STAGES("Check for leaks in MULTIPLE_STAGES mode (manual reset)", "[test_utils][leaks][reset=SW_CPU_RESET, SW_CPU_RESET]", test_fn2, test_fn2, test_fn3);