Skip to content

Commit 2f31944

Browse files
lrgirdwokv2019i
authored andcommitted
boot tests: add support for running boot tests on qemu simulator
Call directly here as more qemu target wont simulate IPC which is used as entry for testing on HW. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent 55442bf commit 2f31944

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

app/src/main.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@
55
*/
66

77
#include <zephyr/kernel.h>
8-
8+
#include <sof/boot_test.h>
99
#include <zephyr/logging/log.h>
1010
LOG_MODULE_REGISTER(main, LOG_LEVEL_DBG);
1111

12+
/* define qemu boot tests if any qemu target is defined, add targets to end */
13+
#if defined(CONFIG_BOARD_QEMU_XTENSA_DC233C) ||\
14+
defined(CONFIG_BOARD_QEMU_XTENSA_DC233C_MMU)
15+
#define QEMU_BOOT_TESTS
16+
#endif
17+
1218
/**
1319
* Should be included from sof/schedule/task.h
1420
* but triggers include chain issue
@@ -54,6 +60,9 @@ static int sof_app_main(void)
5460
void test_main(void)
5561
{
5662
sof_app_main();
63+
#if CONFIG_SOF_BOOT_TEST && defined(QEMU_BOOT_TESTS)
64+
sof_run_boot_tests();
65+
#endif
5766
}
5867
#else
5968
int main(void)

0 commit comments

Comments
 (0)