#ifndef _ttail_check_h__ #define _ttail_check_h__ #include #include #include #include #include #include "ttail.h" #include "ttail_init.h" #define TTAIL_CHECK_MAIN(suite) int main(int argc, char **argv) {\ int n_fail;\ SRunner *sr;\ chdir(dirname(argv[0])); /* move in ./tests dir */ \ sr = srunner_create(suite());\ srunner_set_fork_status(sr, CK_FORK);\ srunner_run_all(sr, CK_VERBOSE);\ n_fail = srunner_ntests_failed(sr);\ srunner_free(sr);\ return (n_fail == 0) ? EXIT_SUCCESS : EXIT_FAILURE;\ } #endif