Skip to content

Commit c0469e6

Browse files
committed
ztest: deprecate old ztest API
Deprecate old ztest APIs. Signed-off-by: Anas Nashif <[email protected]>
1 parent e8c228c commit c0469e6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

subsys/testsuite/ztest/include/zephyr/ztest_test_deprecated.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ extern struct ztest_suite_node _ztest_suite_node_list_end[];
9393
* @param state The current state of the machine as it relates to the test executable.
9494
* @return The number of tests that ran.
9595
*/
96+
__deprecated
9697
int ztest_run_registered_test_suites(const void *state);
9798

9899
/**
@@ -104,6 +105,7 @@ int ztest_run_registered_test_suites(const void *state);
104105
* may be called at the end of test_main(). It will cause the test to fail if any suite was
105106
* registered but never ran.
106107
*/
108+
__deprecated
107109
void ztest_verify_all_registered_test_suites_ran(void);
108110

109111
/**
@@ -273,14 +275,14 @@ extern struct k_mem_partition ztest_mem_partition;
273275
*
274276
* @param suite Name of the testing suite
275277
*/
276-
#define ztest_test_suite(suite, ...) \
278+
#define ztest_test_suite(suite, ...) __DEPRECATED_MACRO \
277279
static ZTEST_DMEM struct unit_test _##suite[] = { __VA_ARGS__, { 0 } }
278280
/**
279281
* @brief Run the specified test suite.
280282
*
281283
* @param suite Test suite to run.
282284
*/
283-
#define ztest_run_test_suite(suite) \
285+
#define ztest_run_test_suite(suite) __DEPRECATED_MACRO \
284286
z_ztest_run_test_suite(#suite, _##suite)
285287

286288
/**

0 commit comments

Comments
 (0)