ztest: move end_report implementation
Move the implementation of end_report so it can be used by both code paths (with and without KERNEL). Signed-off-by: Yuval Peress <peress@google.com>
This commit is contained in:
parent
cdb961eac6
commit
08db645d81
1 changed files with 9 additions and 9 deletions
|
@ -55,6 +55,15 @@ static ZTEST_BMEM int test_status;
|
|||
|
||||
extern ZTEST_DMEM const struct ztest_arch_api ztest_api;
|
||||
|
||||
void end_report(void)
|
||||
{
|
||||
if (test_status) {
|
||||
TC_END_REPORT(TC_FAIL);
|
||||
} else {
|
||||
TC_END_REPORT(TC_PASS);
|
||||
}
|
||||
}
|
||||
|
||||
static int cleanup_test(struct ztest_unit_test *test)
|
||||
{
|
||||
int ret = TC_PASS;
|
||||
|
@ -665,15 +674,6 @@ int z_ztest_run_test_suite(const char *name)
|
|||
return z_ztest_run_test_suite_ptr(ztest_find_test_suite(name));
|
||||
}
|
||||
|
||||
void end_report(void)
|
||||
{
|
||||
if (test_status) {
|
||||
TC_END_REPORT(TC_FAIL);
|
||||
} else {
|
||||
TC_END_REPORT(TC_PASS);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USERSPACE
|
||||
K_APPMEM_PARTITION_DEFINE(ztest_mem_partition);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue