From f5a11dc454fc0f10b45030b90e6acb6b233daae8 Mon Sep 17 00:00:00 2001 From: Jakub Dabek Date: Tue, 23 Jan 2024 11:02:11 +0100 Subject: [PATCH] boot_test: change call of boot tests Boot tests were dependent on ipc. Change to run theme as part of zephyr boot process. Calls to zephyr api were deprecated and would not build with current zephyr version. Update the call. Signed-off-by: Jakub Dabek --- src/ipc/ipc4/handler.c | 10 ---------- zephyr/boot_test.c | 8 ++++++++ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/ipc/ipc4/handler.c b/src/ipc/ipc4/handler.c index bdc0fc541..e54b88643 100644 --- a/src/ipc/ipc4/handler.c +++ b/src/ipc/ipc4/handler.c @@ -1542,14 +1542,4 @@ void ipc_cmd(struct ipc_cmd_hdr *_hdr) ipc4_send_reply(&reply); } - -#if CONFIG_SOF_BOOT_TEST - /* - * When the first FW_GEN IPC has been processed we are in a stable - * running state, now if a test causes an exception, we have a good - * chance of capturing it. - */ - if (target == SOF_IPC4_MESSAGE_TARGET_FW_GEN_MSG) - TEST_RUN_ONCE(ztest_run_test_suite, sof_boot); -#endif } diff --git a/zephyr/boot_test.c b/zephyr/boot_test.c index bd1b22a95..4cbbfa597 100644 --- a/zephyr/boot_test.c +++ b/zephyr/boot_test.c @@ -4,9 +4,17 @@ */ #include +#include #include LOG_MODULE_REGISTER(sof_boot_test, LOG_LEVEL_DBG); ZTEST_SUITE(sof_boot, NULL, NULL, NULL, NULL, NULL); + +void sys_run_boot_tests(void) +{ + ztest_run_all(NULL, false, 1, 1); +} +SYS_INIT(sys_run_boot_tests, APPLICATION, 99); +