Add notBefore and notAfter to SSL cert info display
[pgsql.git] / src / test / regress / pg_regress.h
blob5b636ca3009265c26b368c833d0b62b4cf9edc79
1 /*-------------------------------------------------------------------------
2 * pg_regress.h --- regression test driver
4 * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
5 * Portions Copyright (c) 1994, Regents of the University of California
7 * src/test/regress/pg_regress.h
8 *-------------------------------------------------------------------------
9 */
11 #include <unistd.h>
13 #ifndef WIN32
14 #define PID_TYPE pid_t
15 #define INVALID_PID (-1)
16 #else
17 #define PID_TYPE HANDLE
18 #define INVALID_PID INVALID_HANDLE_VALUE
19 #endif
21 struct StringInfoData; /* avoid including stringinfo.h here */
23 /* simple list of strings */
24 typedef struct _stringlist
26 char *str;
27 struct _stringlist *next;
28 } _stringlist;
31 * Callback function signatures for test programs that use regression_main()
34 /* Initialize at program start */
35 typedef void (*init_function) (int argc, char **argv);
37 /* Launch one test case */
38 typedef PID_TYPE(*test_start_function) (const char *testname,
39 _stringlist **resultfiles,
40 _stringlist **expectfiles,
41 _stringlist **tags);
43 /* Postprocess one result file (optional) */
44 typedef void (*postprocess_result_function) (const char *filename);
47 extern char *bindir;
48 extern char *libdir;
49 extern char *datadir;
50 extern char *host_platform;
52 extern _stringlist *dblist;
53 extern bool debug;
54 extern char *inputdir;
55 extern char *outputdir;
56 extern char *expecteddir;
57 extern char *launcher;
59 extern const char *basic_diff_opts;
60 extern const char *pretty_diff_opts;
62 int regression_main(int argc, char *argv[],
63 init_function ifunc,
64 test_start_function startfunc,
65 postprocess_result_function postfunc);
67 void add_stringlist_item(_stringlist **listhead, const char *str);
68 PID_TYPE spawn_process(const char *cmdline);
69 bool file_exists(const char *file);