Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 26fdff1

Browse files
committed
Allow multiple --temp-config arguments to pg_regress
This means that if, for example, TEMP_CONFIG is set and a Makefile explicitly sets a temp-config file, both will now be used. Patch from John Gorman.
1 parent 87cc6b5 commit 26fdff1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/test/regress/pg_regress.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static char *encoding = NULL;
8080
static _stringlist *schedulelist = NULL;
8181
static _stringlist *extra_tests = NULL;
8282
static char *temp_instance = NULL;
83-
static char *temp_config = NULL;
83+
static _stringlist *temp_configs = NULL;
8484
static bool nolocale = false;
8585
static bool use_existing = false;
8686
static char *hostname = NULL;
@@ -2117,7 +2117,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
21172117
split_to_stringlist(strdup(optarg), ", ", &extraroles);
21182118
break;
21192119
case 19:
2120-
temp_config = strdup(optarg);
2120+
add_stringlist_item(&temp_configs, optarg);
21212121
break;
21222122
case 20:
21232123
use_existing = true;
@@ -2249,8 +2249,9 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
22492249
fputs("log_temp_files = 128kB\n", pg_conf);
22502250
fputs("max_prepared_transactions = 2\n", pg_conf);
22512251

2252-
if (temp_config != NULL)
2252+
for (sl = temp_configs; sl != NULL; sl = sl->next)
22532253
{
2254+
char *temp_config = sl->str;
22542255
FILE *extra_conf;
22552256
char line_buf[1024];
22562257

0 commit comments

Comments
 (0)