Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/include/sof/boot_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ struct k_thread;

void sof_run_boot_tests(void);

/**
* ZTEST_SUITE() predicate for standalone test suites that run themselves
* from a SYS_INIT hook with ztest_run_test_suite(). That call does not
* check the predicate, but ztest_run_all() in sof_run_boot_tests() does,
* so the suite is not run a second time.
*/
static inline bool sof_boot_test_standalone_predicate(const void *state)
{
(void)state;
return false;
}

/**
* Mark a boot-test thread as expected to trigger a fatal error.
*
Expand Down
2 changes: 1 addition & 1 deletion zephyr/test/userspace/test_intel_hda_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ ZTEST(userspace_intel_hda_dma, dma_mem_to_host)
ztest_test_pass();
}

ZTEST_SUITE(userspace_intel_hda_dma, NULL, NULL, NULL, NULL, NULL);
ZTEST_SUITE(userspace_intel_hda_dma, sof_boot_test_standalone_predicate, NULL, NULL, NULL, NULL);

/**
* SOF main has booted up and IPC handling is stopped.
Expand Down
2 changes: 1 addition & 1 deletion zephyr/test/userspace/test_intel_ssp_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ ZTEST(userspace_intel_dai_ssp, dai_ssp_loopback_setup)
ztest_test_pass();
}

ZTEST_SUITE(userspace_intel_dai_ssp, NULL, NULL, NULL, NULL, NULL);
ZTEST_SUITE(userspace_intel_dai_ssp, sof_boot_test_standalone_predicate, NULL, NULL, NULL, NULL);

/**
* SOF main has booted up and IPC handling is stopped.
Expand Down
2 changes: 1 addition & 1 deletion zephyr/test/userspace/test_ll_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ ZTEST(userspace_ll, pipeline_check)
pipeline_check();
}

ZTEST_SUITE(userspace_ll, NULL, NULL, NULL, NULL, NULL);
ZTEST_SUITE(userspace_ll, sof_boot_test_standalone_predicate, NULL, NULL, NULL, NULL);

/**
* SOF main has booted up and IPC handling is stopped.
Expand Down
2 changes: 1 addition & 1 deletion zephyr/test/userspace/test_mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ ZTEST(userspace_mailbox, mailbox_test)
ztest_test_pass();
}

ZTEST_SUITE(userspace_mailbox, NULL, NULL, NULL, NULL, NULL);
ZTEST_SUITE(userspace_mailbox, sof_boot_test_standalone_predicate, NULL, NULL, NULL, NULL);

/**
* SOF main has booted up and IPC handling is stopped.
Expand Down
Loading