13#ifndef ZEPHYR_TESTSUITE_ZTEST_TEST_H_
14#define ZEPHYR_TESTSUITE_ZTEST_TEST_H_
30void z_ztest_run_test_suite(
const char *name,
struct unit_test *suite);
88#define ztest_unit_test_setup_teardown(fn, setup, teardown) { \
89 STRINGIFY(fn), fn, setup, teardown, 0 \
105#define ztest_user_unit_test_setup_teardown(fn, setup, teardown) { \
106 STRINGIFY(fn), fn, setup, teardown, K_USER \
117#define ztest_unit_test(fn) \
118 ztest_unit_test_setup_teardown(fn, unit_test_noop, unit_test_noop)
130#define ztest_user_unit_test(fn) \
131 ztest_user_unit_test_setup_teardown(fn, unit_test_noop, unit_test_noop)
133__syscall
void z_test_1cpu_start(
void);
134__syscall
void z_test_1cpu_stop(
void);
145#define ztest_1cpu_unit_test(fn) \
146 ztest_unit_test_setup_teardown(fn, z_test_1cpu_start, z_test_1cpu_stop)
148#define ztest_1cpu_unit_test(fn) ztest_unit_test(fn)
160#define ztest_1cpu_user_unit_test(fn) \
161 ztest_user_unit_test_setup_teardown(fn, z_test_1cpu_start, z_test_1cpu_stop)
163#define ztest_1cpu_user_unit_test(fn) ztest_user_unit_test(fn)
167#ifdef CONFIG_USERSPACE
168#define ZTEST_DMEM K_APP_DMEM(ztest_mem_partition)
169#define ZTEST_BMEM K_APP_BMEM(ztest_mem_partition)
170#define ZTEST_SECTION K_APP_DMEM_SECTION(ztest_mem_partition)
175#define ZTEST_SECTION .data
193#define ztest_test_suite(suite, ...) \
194 static ZTEST_DMEM struct unit_test _##suite[] = { \
202#define ztest_run_test_suite(suite) \
203 z_ztest_run_test_suite(#suite, _##suite)
208#ifndef ZTEST_UNITTEST
209#include <syscalls/ztest_test.h>
void
Definition: eswifi_shell.c:15
void ztest_test_pass(void)
Pass the currently running test.
struct k_mem_partition ztest_mem_partition
void ztest_test_fail(void)
Fail the currently running test.
void ztest_test_skip(void)
Skip the current test.
static void unit_test_noop(void)
Do nothing, successfully.
Definition: ztest_test.h:73
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
Memory Partition.
Definition: mem_domain.h:55
Definition: ztest_test.h:22
void(* setup)(void)
Definition: ztest_test.h:25
void(* teardown)(void)
Definition: ztest_test.h:26
uint32_t thread_options
Definition: ztest_test.h:27
void(* test)(void)
Definition: ztest_test.h:24
const char * name
Definition: ztest_test.h:23