1 /*-------------------------------------------------------------------------
2 * pg_regress.h --- regression test driver
4 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
5 * Portions Copyright (c) 1994, Regents of the University of California
8 *-------------------------------------------------------------------------
11 #include "postgres_fe.h"
15 #define PID_TYPE pid_t
16 #define INVALID_PID (-1)
18 #define PID_TYPE HANDLE
19 #define INVALID_PID INVALID_HANDLE_VALUE
22 /* simple list of strings */
23 typedef struct _stringlist
26 struct _stringlist
*next
;
29 typedef PID_TYPE(*test_function
) (const char *,
33 typedef void (*init_function
) (void);
38 extern char *host_platform
;
40 extern _stringlist
*dblist
;
42 extern char *inputdir
;
43 extern char *outputdir
;
46 * This should not be global but every module should be able to read command
51 extern const char *basic_diff_opts
;
52 extern const char *pretty_diff_opts
;
54 int regression_main(int argc
, char *argv
[],
55 init_function ifunc
, test_function tfunc
);
56 void add_stringlist_item(_stringlist
** listhead
, const char *str
);
57 PID_TYPE
spawn_process(const char *cmdline
);
58 void exit_nicely(int code
);
59 void replace_string(char *string
, char *replace
, char *replacement
);
60 bool file_exists(const char *file
);