Skip to content

Commit 9c5a577

Browse files
committed
qemu: exit for boot test only otherwise spin
Keep spinning in case user needs to inspect status via monitor. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent 702de1c commit 9c5a577

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

app/src/main.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static int sof_app_main(void)
5757
return 0;
5858
}
5959

60-
#if CONFIG_SOF_BOOT_TEST && defined(QEMU_BOOT_TESTS)
60+
#if defined(QEMU_BOOT_TESTS)
6161
/* cleanly exit qemu so CI can continue and check test results */
6262
static inline void qemu_xtensa_exit(int status)
6363
{
@@ -73,6 +73,18 @@ static inline void qemu_xtensa_exit(int status)
7373
}
7474
#endif
7575

76+
#ifdef CONFIG_REBOOT
77+
void sys_arch_reboot(int type)
78+
{
79+
#if defined(QEMU_BOOT_TESTS)
80+
qemu_xtensa_exit(type);
81+
#endif
82+
while (1) {
83+
k_cpu_idle();
84+
}
85+
}
86+
#endif
87+
7688
#if CONFIG_ZTEST
7789
void test_main(void)
7890
{

0 commit comments

Comments
 (0)