From f6ee9362cd3bd23715ff97210cffe489a5356abb Mon Sep 17 00:00:00 2001 From: Yinfang Wang Date: Wed, 6 Jul 2022 22:05:34 +0800 Subject: [PATCH] tests: subsys/debug: move coredump_backends to new ztest API Move test coredump_backends to use new ztest API. Signed-off-by: Yinfang Wang --- tests/subsys/debug/coredump_backends/prj.conf | 1 + .../debug/coredump_backends/prj_backend_other.conf | 1 + .../coredump_backends/prj_flash_partition.conf | 1 + tests/subsys/debug/coredump_backends/src/main.c | 14 ++++++-------- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/subsys/debug/coredump_backends/prj.conf b/tests/subsys/debug/coredump_backends/prj.conf index 5782faee582..6aa3b4b46fc 100644 --- a/tests/subsys/debug/coredump_backends/prj.conf +++ b/tests/subsys/debug/coredump_backends/prj.conf @@ -6,3 +6,4 @@ CONFIG_DEBUG_COREDUMP_BACKEND_LOGGING=y CONFIG_MP_NUM_CPUS=1 CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=y CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_LINKER_RAM=n +CONFIG_ZTEST_NEW_API=y diff --git a/tests/subsys/debug/coredump_backends/prj_backend_other.conf b/tests/subsys/debug/coredump_backends/prj_backend_other.conf index ec8c3242f67..52e73d211a6 100644 --- a/tests/subsys/debug/coredump_backends/prj_backend_other.conf +++ b/tests/subsys/debug/coredump_backends/prj_backend_other.conf @@ -4,3 +4,4 @@ CONFIG_DEBUG_COREDUMP_BACKEND_OTHER=y CONFIG_MP_NUM_CPUS=1 CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=y CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_LINKER_RAM=n +CONFIG_ZTEST_NEW_API=y diff --git a/tests/subsys/debug/coredump_backends/prj_flash_partition.conf b/tests/subsys/debug/coredump_backends/prj_flash_partition.conf index 793c74e2340..77cedec7a10 100644 --- a/tests/subsys/debug/coredump_backends/prj_flash_partition.conf +++ b/tests/subsys/debug/coredump_backends/prj_flash_partition.conf @@ -7,3 +7,4 @@ CONFIG_MP_NUM_CPUS=1 CONFIG_FLASH=y CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=y CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_LINKER_RAM=n +CONFIG_ZTEST_NEW_API=y diff --git a/tests/subsys/debug/coredump_backends/src/main.c b/tests/subsys/debug/coredump_backends/src/main.c index d8c69052e7e..88eb6f26d2a 100644 --- a/tests/subsys/debug/coredump_backends/src/main.c +++ b/tests/subsys/debug/coredump_backends/src/main.c @@ -106,12 +106,10 @@ void test_verify_stored_dump(void) } } -void test_main(void) -{ - ztest_test_suite(coredump_backends, - ztest_unit_test(test_coredump), - ztest_unit_test(test_query_stored_dump), - ztest_unit_test(test_verify_stored_dump)); - ztest_run_test_suite(coredump_backends); - +ZTEST(coredump_backends, test_coredump_backend) { + test_coredump(); + test_query_stored_dump(); + test_verify_stored_dump(); } + +ZTEST_SUITE(coredump_backends, NULL, NULL, NULL, NULL, NULL);