2008-02-27 20:56:47 +03:00
|
|
|
#ifndef _SUPPORT_H
|
|
|
|
#define _SUPPORT_H
|
|
|
|
|
2008-08-01 17:58:28 +04:00
|
|
|
#ifndef _GNU_SOURCE
|
|
|
|
#define _GNU_SOURCE
|
|
|
|
#endif
|
|
|
|
|
2008-02-27 20:56:47 +03:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <check.h>
|
|
|
|
|
|
|
|
#include "csync_private.h"
|
|
|
|
|
2008-05-07 12:56:36 +04:00
|
|
|
/* Used by main to communicate with parse_opt. */
|
|
|
|
struct argument_s {
|
|
|
|
char *args[2]; /* SOURCE and DESTINATION */
|
|
|
|
int nofork;
|
|
|
|
};
|
|
|
|
|
|
|
|
void cmdline_parse(int argc, char **argv, struct argument_s *arguments);
|
|
|
|
|
2008-02-27 20:56:47 +03:00
|
|
|
/* create_case() with timeout of 30seconds (default) */
|
|
|
|
void create_case(Suite *s, const char *name, TFun function);
|
|
|
|
|
|
|
|
/* create_case() with timeout of 30seconds (default) and fixture */
|
2008-05-07 12:56:36 +04:00
|
|
|
void create_case_fixture(Suite *s, const char *name, TFun function,
|
|
|
|
void (*setup)(void), void (*teardown)(void));
|
2008-02-27 20:56:47 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* create_case_timeout() allow to specific a specific timeout - intended for
|
|
|
|
* breaking testcases which needs longer then 30seconds (default)
|
|
|
|
*/
|
|
|
|
void create_case_timeout(Suite *s, const char *name, TFun function,
|
|
|
|
int timeout);
|
|
|
|
|
|
|
|
#endif /* _SUPPORT_H */
|