#ifndef __TEST_MAIN_H__ #define __TEST_MAIN_H__ #include #include #include #include void testsuite_report_failcount(int failcount); #define TESTSUITE(cmocka_unittest) \ static void __attribute__((constructor)) run(void) \ { \ testsuite_report_failcount(cmocka_run_group_tests(cmocka_unittest, NULL, NULL)); \ } #define TESTSUITE_FIXTURE(cmocka_unittest, setup, teardown) \ static void __attribute__((constructor)) run(void) \ { \ testsuite_report_failcount(cmocka_run_group_tests(cmocka_unittest, setup, teardown)); \ } #endif //__TEST_MAIN_H__