doc
support.h
Go to the documentation of this file.
1 #ifndef _SUPPORT_H
2 #define _SUPPORT_H
3 
4 #ifndef _GNU_SOURCE
5 #define _GNU_SOURCE
6 #endif
7 
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <check.h>
11 
12 #include "csync_private.h"
13 
14 /* Used by main to communicate with parse_opt. */
15 struct argument_s {
16  char *args[2]; /* SOURCE and DESTINATION */
17  int nofork;
18 };
19 
20 void cmdline_parse(int argc, char **argv, struct argument_s *arguments);
21 
22 /* create_case() with timeout of 30seconds (default) */
23 void create_case(Suite *s, const char *name, TFun function);
24 
25 /* create_case() with timeout of 30seconds (default) and fixture */
26 void create_case_fixture(Suite *s, const char *name, TFun function,
27  void (*setup)(void), void (*teardown)(void));
28 
29 /*
30  * create_case_timeout() allow to specific a specific timeout - intended for
31  * breaking testcases which needs longer then 30seconds (default)
32  */
33 void create_case_timeout(Suite *s, const char *name, TFun function,
34  int timeout);
35 
36 #endif /* _SUPPORT_H */