diff options
Diffstat (limited to 'include/test/ut.h')
-rw-r--r-- | include/test/ut.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/test/ut.h b/include/test/ut.h index 88e75ab..7cb5e10 100644 --- a/include/test/ut.h +++ b/include/test/ut.h @@ -357,6 +357,26 @@ void ut_silence_console(struct unit_test_state *uts); void ut_unsilence_console(struct unit_test_state *uts); /** + * test_pre_run() - Handle any preparation needed to run a test + * + * @uts: Test state + * @test: Test to prepare for + * @return 0 if OK, -EAGAIN to skip this test since some required feature is not + * available, other -ve on error (meaning that testing cannot likely + * continue) + */ +int test_pre_run(struct unit_test_state *uts, struct unit_test *test); + +/** + * test_post_run() - Handle cleaning up after a test + * + * @uts: Test state + * @test: Test to clean up after + * @return 0 if OK, -ve on error (meaning that testing cannot likely continue) + */ +int test_post_run(struct unit_test_state *uts, struct unit_test *test); + +/** * ut_run_tests() - Run a set of tests * * This runs the tests, handling any preparation and clean-up needed. It prints |