4 #include <CUnit/CUnit.h>
5 #include <CUnit/Basic.h>
9 CU_SuiteInfo vlock_test_suites
[] = {
10 { "test_list" , NULL
, NULL
, list_tests
},
14 int main(int __attribute__((unused
)) argc
, const char *argv
[])
16 if (CU_initialize_registry() != CUE_SUCCESS
) {
17 fprintf(stderr
, "%s: CUnit initialization failed\n", argv
[0]);
21 if (CU_register_suites(vlock_test_suites
) != CUE_SUCCESS
) {
22 fprintf(stderr
, "%s: registering test suites failed: %s\n", argv
[0], CU_get_error_msg());
25 if (CU_basic_run_tests() != CUE_SUCCESS
) {
26 fprintf(stderr
, "%s: running tests failed\n", argv
[0]);
30 if (CU_get_number_of_tests_failed() > 0)
33 CU_cleanup_registry();
37 CU_cleanup_registry();