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 <jakub.dabek@intel.com>
This commit is contained in:
Jakub Dabek 2024-01-23 11:02:11 +01:00 committed by Michal Wasko
parent 60f517cd09
commit f5a11dc454
2 changed files with 8 additions and 10 deletions

View File

@ -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
}

View File

@ -4,9 +4,17 @@
*/
#include <zephyr/logging/log.h>
#include <sof/boot_test.h>
#include <zephyr/ztest.h>
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);