timed tail for logfiles. Display loglines given a minimum date and/or a maximum date.
c
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ttail_check.h 574B

123456789101112131415161718192021222324252627
  1. #ifndef _ttail_check_h__
  2. #define _ttail_check_h__
  3. #include <check.h>
  4. #include <errno.h>
  5. #include <stdio.h>
  6. #include <unistd.h>
  7. #include <libgen.h>
  8. #include "ttail.h"
  9. #include "ttail_init.h"
  10. #define TTAIL_CHECK_MAIN(suite) int main(int argc, char **argv) {\
  11. int n_fail;\
  12. SRunner *sr;\
  13. chdir(dirname(argv[0])); /* move in ./tests dir */ \
  14. sr = srunner_create(suite());\
  15. srunner_set_fork_status(sr, CK_FORK);\
  16. srunner_run_all(sr, CK_VERBOSE);\
  17. n_fail = srunner_ntests_failed(sr);\
  18. srunner_free(sr);\
  19. return (n_fail == 0) ? EXIT_SUCCESS : EXIT_FAILURE;\
  20. }
  21. #endif