Skip to content

Commit ea43c53

Browse files
lrgirdwolgirdwood
authored andcommitted
zephyr: native_sim: run boot tests at boot if STANDALONE enabled
Only run sof_run_boot_tests() at boot for QEMU or native_sim (STANDALONE) targets. Other platforms trigger via IPC.
1 parent 9c209bc commit ea43c53

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

app/src/main.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,15 @@ void sys_arch_reboot(int type)
8989
void test_main(void)
9090
{
9191
sof_app_main();
92-
#if CONFIG_SOF_BOOT_TEST && defined(QEMU_BOOT_TESTS)
92+
#if CONFIG_SOF_BOOT_TEST && (defined(QEMU_BOOT_TESTS) || CONFIG_SOF_BOOT_TEST_STANDALONE)
9393
sof_run_boot_tests();
94+
#if defined(QEMU_BOOT_TESTS)
95+
/* qemu_xtensa_exit() only exists for QEMU targets; a standalone
96+
* boot test (e.g. native_sim) just returns from test_main()
97+
*/
9498
qemu_xtensa_exit(0);
9599
#endif
100+
#endif
96101
}
97102
#else
98103
int main(void)

scripts/xtensa-build-zephyr.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,8 +1198,8 @@ def install_platform(platform, sof_output_dir, platf_build_environ, platform_wco
11981198
install_key_dir = install_key_dir / args.key_type_subdir
11991199

12001200
os.makedirs(install_key_dir, exist_ok=True)
1201-
# looses file owner and group - file is commonly accessible, dont install qemu.
1202-
if platform not in ("qemu_xtensa", "qemu_xtensa_mmu"):
1201+
# loses file owner and group - file is commonly accessible, don't install for qemu.
1202+
if platform not in ("qemu_xtensa", "qemu_xtensa_mmu", "native_sim"):
12031203
shutil.copy2(abs_build_dir / "zephyr.ri", install_key_dir / output_fwname)
12041204

12051205
if args.deployable_build and platform_configs[platform].ipc4:
@@ -1353,7 +1353,7 @@ def gzip_compress(fname, gzdst=None):
13531353
RI_INFO_UNSUPPORTED += ['imx8', 'imx8x', 'imx8m', 'imx8m_cm7', 'imx8ulp', 'imx95']
13541354
RI_INFO_UNSUPPORTED += ['rn', 'acp_6_0', 'acp_7_0', 'acp_7_x']
13551355
RI_INFO_UNSUPPORTED += ['mt8186', 'mt8188', 'mt8195', 'mt8196', 'mt8365']
1356-
RI_INFO_UNSUPPORTED += ['qemu_xtensa', 'qemu_xtensa_mmu']
1356+
RI_INFO_UNSUPPORTED += ['qemu_xtensa', 'qemu_xtensa_mmu', 'native_sim']
13571357

13581358

13591359
# For temporary workarounds. Unlike _UNSUPPORTED above, the platforms below will print a warning.

0 commit comments

Comments
 (0)