PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pg_regress.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  * pg_regress.h --- regression test driver
3  *
4  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
5  * Portions Copyright (c) 1994, Regents of the University of California
6  *
7  * src/test/regress/pg_regress.h
8  *-------------------------------------------------------------------------
9  */
10 
11 #include "postgres_fe.h"
12 #include <unistd.h>
13 
14 #ifndef WIN32
15 #define PID_TYPE pid_t
16 #define INVALID_PID (-1)
17 #else
18 #define PID_TYPE HANDLE
19 #define INVALID_PID INVALID_HANDLE_VALUE
20 #endif
21 
22 /* simple list of strings */
23 typedef struct _stringlist
24 {
25  char *str;
26  struct _stringlist *next;
27 } _stringlist;
28 
29 typedef PID_TYPE(*test_function) (const char *,
30  _stringlist **,
31  _stringlist **,
32  _stringlist **);
33 typedef void (*init_function) (int argc, char **argv);
34 
35 extern char *bindir;
36 extern char *libdir;
37 extern char *datadir;
38 extern char *host_platform;
39 
40 extern _stringlist *dblist;
41 extern bool debug;
42 extern char *inputdir;
43 extern char *outputdir;
44 extern char *launcher;
45 
46 extern const char *basic_diff_opts;
47 extern const char *pretty_diff_opts;
48 
49 int regression_main(int argc, char *argv[],
50  init_function ifunc, test_function tfunc);
51 void add_stringlist_item(_stringlist **listhead, const char *str);
52 PID_TYPE spawn_process(const char *cmdline);
53 void replace_string(char *string, char *replace, char *replacement);
54 bool file_exists(const char *file);
bool debug
Definition: pg_standby.c:46
void add_stringlist_item(_stringlist **listhead, const char *str)
Definition: pg_regress.c:152
char * str
Definition: pg_regress.h:25
int regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc)
Definition: pg_regress.c:2018
#define PID_TYPE
Definition: pg_regress.h:15
char * libdir
const char * basic_diff_opts
Definition: pg_regress.c:62
void replace_string(char *string, char *replace, char *replacement)
Definition: pg_regress.c:438
char * inputdir
Definition: pg_regress.c:72
PID_TYPE spawn_process(const char *cmdline)
Definition: pg_regress.c:1124
char * datadir
struct _stringlist _stringlist
char * outputdir
Definition: pg_regress.c:73
const char * pretty_diff_opts
Definition: pg_regress.c:63
char * launcher
Definition: pg_regress.c:75
char * host_platform
Definition: pg_regress.c:50
_stringlist * dblist
Definition: pg_regress.c:70
PID_TYPE(* test_function)(const char *, _stringlist **, _stringlist **, _stringlist **)
Definition: pg_regress.h:29
struct _stringlist * next
Definition: pg_regress.h:26
char * bindir
Definition: pg_regress.c:74
bool file_exists(const char *file)
Definition: pg_regress.c:1228
void(* init_function)(int argc, char **argv)
Definition: pg_regress.h:33