*** pgsql/src/test/regress/pg_regress.c 2009/11/23 16:02:24 1.67 --- pgsql/src/test/regress/pg_regress.c 2009/12/19 01:32:45 1.68 *************** *** 11,17 **** * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * ! * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.66 2009/11/22 17:54:23 tgl Exp $ * *------------------------------------------------------------------------- */ --- 11,17 ---- * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * ! * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.67 2009/11/23 16:02:24 tgl Exp $ * *------------------------------------------------------------------------- */ *************** static char *temp_install = NULL; *** 93,98 **** --- 93,99 ---- static char *temp_config = NULL; static char *top_builddir = NULL; static bool nolocale = false; + static bool use_existing = false; static char *hostname = NULL; static int port = -1; static bool port_specified_by_user = false; *************** run_schedule(const char *schedule, test_ *** 1545,1551 **** if (num_tests == 1) { ! status(_("test %-20s ... "), tests[0]); pids[0] = (tfunc) (tests[0], &resultfiles[0], &expectfiles[0], &tags[0]); wait_for_tests(pids, statuses, NULL, 1); /* status line is finished below */ --- 1546,1552 ---- if (num_tests == 1) { ! status(_("test %-24s ... "), tests[0]); pids[0] = (tfunc) (tests[0], &resultfiles[0], &expectfiles[0], &tags[0]); wait_for_tests(pids, statuses, NULL, 1); /* status line is finished below */ *************** run_schedule(const char *schedule, test_ *** 1590,1596 **** bool differ = false; if (num_tests > 1) ! status(_(" %-20s ... "), tests[i]); /* * Advance over all three lists simultaneously. --- 1591,1597 ---- bool differ = false; if (num_tests > 1) ! status(_(" %-24s ... "), tests[i]); /* * Advance over all three lists simultaneously. *************** regression_main(int argc, char *argv[], *** 1918,1923 **** --- 1919,1925 ---- {"dlpath", required_argument, NULL, 17}, {"create-role", required_argument, NULL, 18}, {"temp-config", required_argument, NULL, 19}, + {"use-existing", no_argument, NULL, 20}, {NULL, 0, NULL, 0} }; *************** regression_main(int argc, char *argv[], *** 2008,2013 **** --- 2010,2018 ---- case 19: temp_config = strdup(optarg); break; + case 20: + use_existing = true; + break; default: /* getopt_long already emitted a complaint */ fprintf(stderr, _("\nTry \"%s -h\" for more information.\n"), *************** regression_main(int argc, char *argv[], *** 2254,2272 **** * Using an existing installation, so may need to get rid of * pre-existing database(s) and role(s) */ ! for (sl = dblist; sl; sl = sl->next) ! drop_database_if_exists(sl->str); ! for (sl = extraroles; sl; sl = sl->next) ! drop_role_if_exists(sl->str); } /* * Create the test database(s) and role(s) */ ! for (sl = dblist; sl; sl = sl->next) ! create_database(sl->str); ! for (sl = extraroles; sl; sl = sl->next) ! create_role(sl->str, dblist); /* * Ready to run the tests --- 2259,2283 ---- * Using an existing installation, so may need to get rid of * pre-existing database(s) and role(s) */ ! if (!use_existing) ! { ! for (sl = dblist; sl; sl = sl->next) ! drop_database_if_exists(sl->str); ! for (sl = extraroles; sl; sl = sl->next) ! drop_role_if_exists(sl->str); ! } } /* * Create the test database(s) and role(s) */ ! if (!use_existing) ! { ! for (sl = dblist; sl; sl = sl->next) ! create_database(sl->str); ! for (sl = extraroles; sl; sl = sl->next) ! create_role(sl->str, dblist); ! } /* * Ready to run the tests