mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
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.
This commit is contained in:
parent
87cc6b57a9
commit
26fdff1b8f
@ -80,7 +80,7 @@ static char *encoding = NULL;
|
|||||||
static _stringlist *schedulelist = NULL;
|
static _stringlist *schedulelist = NULL;
|
||||||
static _stringlist *extra_tests = NULL;
|
static _stringlist *extra_tests = NULL;
|
||||||
static char *temp_instance = NULL;
|
static char *temp_instance = NULL;
|
||||||
static char *temp_config = NULL;
|
static _stringlist *temp_configs = NULL;
|
||||||
static bool nolocale = false;
|
static bool nolocale = false;
|
||||||
static bool use_existing = false;
|
static bool use_existing = false;
|
||||||
static char *hostname = NULL;
|
static char *hostname = NULL;
|
||||||
@ -2117,7 +2117,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
|
|||||||
split_to_stringlist(strdup(optarg), ", ", &extraroles);
|
split_to_stringlist(strdup(optarg), ", ", &extraroles);
|
||||||
break;
|
break;
|
||||||
case 19:
|
case 19:
|
||||||
temp_config = strdup(optarg);
|
add_stringlist_item(&temp_configs, optarg);
|
||||||
break;
|
break;
|
||||||
case 20:
|
case 20:
|
||||||
use_existing = true;
|
use_existing = true;
|
||||||
@ -2249,8 +2249,9 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
|
|||||||
fputs("log_temp_files = 128kB\n", pg_conf);
|
fputs("log_temp_files = 128kB\n", pg_conf);
|
||||||
fputs("max_prepared_transactions = 2\n", pg_conf);
|
fputs("max_prepared_transactions = 2\n", pg_conf);
|
||||||
|
|
||||||
if (temp_config != NULL)
|
for (sl = temp_configs; sl != NULL; sl = sl->next)
|
||||||
{
|
{
|
||||||
|
char *temp_config = sl->str;
|
||||||
FILE *extra_conf;
|
FILE *extra_conf;
|
||||||
char line_buf[1024];
|
char line_buf[1024];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user