Skip to content

Commit

Permalink
boot_test: change call of boot tests
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
dabekjakub committed Feb 23, 2024
1 parent 5c3a1ca commit 5db6df2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/ipc/ipc4/handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1539,14 +1539,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
}
8 changes: 8 additions & 0 deletions zephyr/boot_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 5db6df2

Please sign in to comment.