| 1 | /*------------------------------------------------------------------------- |
| 2 | * |
| 3 | * isolationtester.h |
| 4 | * include file for isolation tests |
| 5 | * |
| 6 | * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group |
| 7 | * Portions Copyright (c) 1994, Regents of the University of California |
| 8 | * |
| 9 | * IDENTIFICATION |
| 10 | * src/test/isolation/isolationtester.h |
| 11 | * |
| 12 | *------------------------------------------------------------------------- |
| 13 | */ |
| 14 | #ifndef ISOLATIONTESTER_H |
| 15 | #define ISOLATIONTESTER_H |
| 16 | |
| 17 | typedef struct Session Session; |
| 18 | typedef struct Step Step; |
| 19 | |
| 20 | struct Session |
| 21 | { |
| 22 | char *name; |
| 23 | char *setupsql; |
| 24 | char *teardownsql; |
| 25 | Step **steps; |
| 26 | int nsteps; |
| 27 | }; |
| 28 | |
| 29 | struct Step |
| 30 | { |
| 31 | int session; |
| 32 | char *name; |
| 33 | char *sql; |
| 34 | char *errormsg; |
| 35 | }; |
| 36 | |
| 37 | typedef struct |
| 38 | { |
| 39 | int nsteps; |
| 40 | char **stepnames; |
| 41 | } Permutation; |
| 42 | |
| 43 | typedef struct |
| 44 | { |
| 45 | char **setupsqls; |
| 46 | int nsetupsqls; |
| 47 | char *teardownsql; |
| 48 | Session **sessions; |
| 49 | int nsessions; |
| 50 | Permutation **permutations; |
| 51 | int npermutations; |
| 52 | Step **allsteps; |
| 53 | int nallsteps; |
| 54 | } TestSpec; |
| 55 | |
| 56 | extern TestSpec parseresult; |
| 57 | |
| 58 | extern int spec_yyparse(void); |
| 59 | |
| 60 | extern int spec_yylex(void); |
| 61 | extern void spec_yyerror(const char *str); |
| 62 | |
| 63 | #endif /* ISOLATIONTESTER_H */ |
| 64 | |