1 /* Copyright (c) 2024 Nordic Semiconductor ASA
2  * SPDX-License-Identifier: Apache-2.0
3  */
4 
5 #include <zephyr/kernel.h>
6 
7 #include "bstests.h"
8 #include "babblekit/testcase.h"
9 
10 extern void entrypoint_dut(void);
11 extern void entrypoint_tester(void);
12 extern enum bst_result_t bst_result;
13 
test_end_cb(void)14 static void test_end_cb(void)
15 {
16 	if (bst_result != Passed) {
17 		TEST_PRINT("Test has not passed.");
18 	}
19 }
20 
21 static const struct bst_test_instance entrypoints[] = {
22 	{
23 		.test_id = "l2cap/einprogress/dut",
24 		.test_delete_f = test_end_cb,
25 		.test_main_f = entrypoint_dut,
26 	},
27 	{
28 		.test_id = "l2cap/einprogress/tester",
29 		.test_delete_f = test_end_cb,
30 		.test_main_f = entrypoint_tester,
31 	},
32 	BSTEST_END_MARKER,
33 };
34 
install(struct bst_test_list * tests)35 static struct bst_test_list *install(struct bst_test_list *tests)
36 {
37 	return bst_add_tests(tests, entrypoints);
38 };
39 
40 bst_test_install_t test_installers[] = {install, NULL};
41 
main(void)42 int main(void)
43 {
44 	bst_main();
45 
46 	return 0;
47 }
48