From: Michael Meskes Date: Thu, 11 Jan 2007 15:47:34 +0000 (+0000) Subject: Applied Joachim's patch for a --regression option. X-Git-Tag: REL8_3_BETA1~1535 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5b88b85cad70478b607591458e9983b20541e582;p=postgresql Applied Joachim's patch for a --regression option. Made this option mark the .c files, so the environment variable is no longer needed. Created a special MinGW file with the special error message. Do not print port into log file when running regression tests. --- diff --git a/src/interfaces/ecpg/ecpglib/connect.c b/src/interfaces/ecpg/ecpglib/connect.c index 374264cee0..b3cfd80bdc 100644 --- a/src/interfaces/ecpg/ecpglib/connect.c +++ b/src/interfaces/ecpg/ecpglib/connect.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.37 2006/11/08 10:46:47 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.38 2007/01/11 15:47:33 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" @@ -19,6 +19,7 @@ static pthread_once_t actual_connection_key_once = PTHREAD_ONCE_INIT; #endif static struct connection *actual_connection = NULL; static struct connection *all_connections = NULL; +extern int ecpg_internal_regression_mode; #ifdef ENABLE_THREAD_SAFETY static void @@ -464,7 +465,7 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p ECPGlog("ECPGconnect: opening database %s on %s port %s %s%s%s%s\n", realname ? realname : "", host ? host : "", - port ? port : "", + port ? (ecpg_internal_regression_mode ? "" : port) : "", options ? "with options " : "", options ? options : "", user ? "for user " : "", user ? user : ""); @@ -478,7 +479,7 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p ECPGlog("connect: could not open database %s on %s port %s %s%s%s%s in line %d\n\t%s\n", db, host ? host : "", - port ? port : "", + port ? (ecpg_internal_regression_mode ? "" : port) : "", options ? "with options " : "", options ? options : "", user ? "for user " : "", user ? user : "", lineno, errmsg); diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c index ab1f2554ce..6b2bbfa64b 100644 --- a/src/interfaces/ecpg/ecpglib/data.c +++ b/src/interfaces/ecpg/ecpglib/data.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.35 2006/10/04 00:30:11 momjian Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.36 2007/01/11 15:47:33 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" @@ -16,10 +16,7 @@ #include "pgtypes_timestamp.h" #include "pgtypes_interval.h" -static enum -{ - NOT_CHECKED, REGRESS, NORMAL -} ECPG_regression_mode = NOT_CHECKED; +extern int ecpg_internal_regression_mode; static bool garbage_left(enum ARRAY_TYPE isarray, char *scan_length, enum COMPAT_MODE compat) @@ -56,24 +53,11 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno, int value_for_indicator = 0; long log_offset; - /* - * use a global variable to see if the environment variable - * ECPG_REGRESSION is set or not. Remember the state in order to avoid - * subsequent calls to getenv() for this purpose. - */ - if (ECPG_regression_mode == NOT_CHECKED) - { - if (getenv("ECPG_REGRESSION")) - ECPG_regression_mode = REGRESS; - else - ECPG_regression_mode = NORMAL; - } - /* * If we are running in a regression test, do not log the offset variable, * it depends on the machine's alignment. */ - if (ECPG_regression_mode == REGRESS) + if (ecpg_internal_regression_mode) log_offset = -1; else log_offset = offset; diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c index 0bd850d36d..122c7d6328 100644 --- a/src/interfaces/ecpg/ecpglib/misc.c +++ b/src/interfaces/ecpg/ecpglib/misc.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.32 2006/10/04 00:30:11 momjian Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.33 2007/01/11 15:47:33 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" @@ -28,6 +28,8 @@ #endif #endif +extern int ecpg_internal_regression_mode; + static struct sqlca_t sqlca_init = { { @@ -262,7 +264,7 @@ ECPGlog(const char *format,...) * regression tests set this environment variable to get the same * output for every run. */ - if (getenv("ECPG_REGRESSION")) + if (ecpg_internal_regression_mode) snprintf(f, bufsize, "[NO_PID]: %s", format); else snprintf(f, bufsize, "[%d]: %s", (int) getpid(), format); @@ -272,7 +274,7 @@ ECPGlog(const char *format,...) va_end(ap); /* dump out internal sqlca variables */ - if (getenv("ECPG_REGRESSION")) + if (ecpg_internal_regression_mode) fprintf(debugstream, "[NO_PID]: sqlca: code: %ld, state: %s\n", sqlca->sqlcode, sqlca->sqlstate); diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c index c06075ad5f..66b4138c89 100644 --- a/src/interfaces/ecpg/preproc/ecpg.c +++ b/src/interfaces/ecpg/preproc/ecpg.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.94 2006/02/08 09:10:04 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.95 2007/01/11 15:47:33 meskes Exp $ */ /* New main for ecpg, the PostgreSQL embedded SQL precompiler. */ /* (C) Michael Meskes Feb 5th, 1998 */ @@ -8,12 +8,7 @@ #include #include -#ifdef HAVE_GETOPT_H -#include -#endif - -extern int optind; -extern char *optarg; +#include "getopt_long.h" #include "extern.h" @@ -22,7 +17,8 @@ int ret_value = 0, auto_create_c = false, system_includes = false, force_indicator = true, - header_mode = false; + header_mode = false, + regression_mode = false; enum COMPAT_MODE compat = ECPG_COMPAT_PGSQL; @@ -56,6 +52,7 @@ help(const char *progname) " OPTION may only be \"no_indicator\"\n"); printf(" -t turn on autocommit of transactions\n"); printf(" --help show this help, then exit\n"); + printf(" --regression run in regression testing mode\n"); printf(" --version output version information, then exit\n"); printf("\nIf no output file is specified, the name is formed by adding .c to the\n" "input file name, after stripping off .pgc if present.\n"); @@ -112,9 +109,19 @@ add_preprocessor_define(char *define) defines->next = pd; } +#define ECPG_GETOPT_LONG_HELP 1 +#define ECPG_GETOPT_LONG_VERSION 2 +#define ECPG_GETOPT_LONG_REGRESSION 3 int main(int argc, char *const argv[]) { + static struct option ecpg_options[] = { + {"help", no_argument, NULL, ECPG_GETOPT_LONG_HELP}, + {"version", no_argument, NULL, ECPG_GETOPT_LONG_VERSION}, + {"regression", no_argument, NULL, ECPG_GETOPT_LONG_REGRESSION}, + { NULL, 0, NULL, 0} + }; + int fnr, c, verbose = false, @@ -126,27 +133,35 @@ main(int argc, char *const argv[]) progname = get_progname(argv[0]); - if (argc > 1) - { - if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0) - { - help(progname); - exit(0); - } - else if (strcmp(argv[1], "--version") == 0) - { - printf("ecpg (PostgreSQL %s) %d.%d.%d\n", PG_VERSION, - MAJOR_VERSION, MINOR_VERSION, PATCHLEVEL); - exit(0); - } - } - find_my_exec(argv[0], my_exec_path); - while ((c = getopt(argc, argv, "vcio:I:tD:dC:r:h")) != -1) + while ((c = getopt_long(argc, argv, "vcio:I:tD:dC:r:h?", ecpg_options, NULL)) != -1) { switch (c) { + case ECPG_GETOPT_LONG_VERSION: + printf("ecpg (PostgreSQL %s) %d.%d.%d\n", PG_VERSION, + MAJOR_VERSION, MINOR_VERSION, PATCHLEVEL); + exit(0); + case ECPG_GETOPT_LONG_HELP: + help(progname); + exit(0); + /* + * -? is an alternative spelling of --help. However it is also + * returned by getopt_long for unknown options. We can distinguish + * both cases by means of the optopt variable which is set to 0 if + * it was really -? and not an unknown option character. + */ + case '?': + if (optopt == 0) + { + help(progname); + exit(0); + } + break; + case ECPG_GETOPT_LONG_REGRESSION: + regression_mode = true; + break; case 'o': if (strcmp(optarg, "-") == 0) yyout = stdout; @@ -405,8 +420,12 @@ main(int argc, char *const argv[]) /* we need several includes */ /* but not if we are in header mode */ - fprintf(yyout, "/* Processed by ecpg (%d.%d.%d) */\n", MAJOR_VERSION, MINOR_VERSION, PATCHLEVEL); + if (regression_mode) + fprintf(yyout, "/* Processed by ecpg (regression mode) */\n"); + else + fprintf(yyout, "/* Processed by ecpg (%d.%d.%d) */\n", MAJOR_VERSION, MINOR_VERSION, PATCHLEVEL); + fprintf(yyout, "int ecpg_internal_regression_mode = %d;\n", regression_mode); if (header_mode == false) { fprintf(yyout, "/* These include files are added by the preprocessor */\n#include \n#include \n#include \n#include \n"); diff --git a/src/interfaces/ecpg/preproc/extern.h b/src/interfaces/ecpg/preproc/extern.h index 3581b35e3e..d80b05b35b 100644 --- a/src/interfaces/ecpg/preproc/extern.h +++ b/src/interfaces/ecpg/preproc/extern.h @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/extern.h,v 1.63 2006/03/11 04:38:40 momjian Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/extern.h,v 1.64 2007/01/11 15:47:33 meskes Exp $ */ #ifndef _ECPG_PREPROC_EXTERN_H #define _ECPG_PREPROC_EXTERN_H @@ -21,7 +21,8 @@ extern int braces_open, force_indicator, ret_value, struct_level, - ecpg_informix_var; + ecpg_informix_var, + regression_mode; extern char *descriptor_index; extern char *descriptor_name; extern char *connection; diff --git a/src/interfaces/ecpg/test/Makefile.regress b/src/interfaces/ecpg/test/Makefile.regress index c5e017e74a..06ac585ab9 100644 --- a/src/interfaces/ecpg/test/Makefile.regress +++ b/src/interfaces/ecpg/test/Makefile.regress @@ -5,7 +5,7 @@ override CFLAGS += $(PTHREAD_CFLAGS) override LDFLAGS := -L../../ecpglib -L../../pgtypeslib $(LDFLAGS) override LIBS := -lecpg -lpgtypes $(libpq) $(LIBS) $(PTHREAD_LIBS) -ECPG = ../../preproc/ecpg -I$(srcdir)/../../include +ECPG = ../../preproc/ecpg --regression -I$(srcdir)/../../include %: %.c $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) $(LIBS) -o $@ diff --git a/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c b/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c index fdb04ef7cf..f0090cc197 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c index deb914d41a..323e2082a9 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c b/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c index 96be750c8f..6ec78475af 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c b/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c index 5bb8dd366b..2c96cc0e76 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rnull.c b/src/interfaces/ecpg/test/expected/compat_informix-rnull.c index a59d2fc587..9a6df4dbef 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-rnull.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-rnull.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c index db077e022c..8aab843540 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c index 84ae29fb32..8b0495d7a1 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/connect-test1-minGW32.stderr b/src/interfaces/ecpg/test/expected/connect-test1-minGW32.stderr new file mode 100644 index 0000000000..4930c27fd3 --- /dev/null +++ b/src/interfaces/ecpg/test/expected/connect-test1-minGW32.stderr @@ -0,0 +1,83 @@ + +THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT + +[NO_PID]: ECPGdebug: set to 1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGconnect: opening database connectdb on port +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGexecute line 23: QUERY: alter user connectuser encrypted password 'connectpw' on connection main +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGexecute line 23 Ok: ALTER ROLE +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_finish: Connection main closed. +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGconnect: opening database connectdb on localhost port +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_finish: Connection main closed. +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGconnect: opening database on localhost port for user connectdb +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_finish: Connection main closed. +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGconnect: opening database connectdb on localhost port 55432 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_finish: Connection main closed. +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGconnect: opening database on localhost port 55432 for user connectdb +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_finish: Connection main closed. +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGconnect: opening database connectdb on port 55432 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_finish: Connection main closed. +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGconnect: opening database on port 55432 for user connectdb +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_finish: Connection main closed. +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGconnect: opening database connectdb on localhost port 55432 for user connectuser +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_finish: Connection connectdb closed. +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGconnect: opening database on localhost port 55432 for user connectdb +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_finish: Connection closed. +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGconnect: opening database connectdb on localhost port 55432 for user connectuser +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_finish: Connection connectdb closed. +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGconnect: opening database connectdb on port 55432 for user connectuser +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_finish: Connection connectdb closed. +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGconnect: opening database connectdb on port 55432 for user connectuser +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_finish: Connection connectdb closed. +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGconnect: opening database nonexistant on localhost port 55432 for user connectuser +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: connect: could not open database nonexistant on localhost port 55432 for user connectuser in line 62 + FATAL: database "nonexistant" does not exist + +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_finish: Connection nonexistant closed. +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: raising sqlcode -402 in line 62, 'Could not connect to database nonexistant in line 62.'. +[NO_PID]: sqlca: code: -402, state: 08001 +[NO_PID]: raising sqlcode -220 in line 63, 'No such connection CURRENT in line 63.'. +[NO_PID]: sqlca: code: -220, state: 08003 +[NO_PID]: ECPGconnect: opening database connectdb on localhost port 20 for user connectuser +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: connect: could not open database connectdb on localhost port 20 for user connectuser in line 66 + could not connect to server: Connection refused (0x0000274D/10061) + Is the server running on host "localhost" and accepting + TCP/IP connections on port 20? + +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_finish: Connection connectdb closed. +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: raising sqlcode -402 in line 66, 'Could not connect to database connectdb in line 66.'. +[NO_PID]: sqlca: code: -402, state: 08001 +[NO_PID]: ECPGconnect: opening database connectdb on port 55432 for user connectuser +[NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/connect-test1.c b/src/interfaces/ecpg/test/expected/connect-test1.c index 46c37d7d38..2f1cdbec1b 100644 --- a/src/interfaces/ecpg/test/expected/connect-test1.c +++ b/src/interfaces/ecpg/test/expected/connect-test1.c @@ -1,7 +1,5 @@ - -THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT - -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/connect-test1.stderr b/src/interfaces/ecpg/test/expected/connect-test1.stderr index 9b06f8aa42..18911ce434 100644 --- a/src/interfaces/ecpg/test/expected/connect-test1.stderr +++ b/src/interfaces/ecpg/test/expected/connect-test1.stderr @@ -1,6 +1,3 @@ - -THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT - [NO_PID]: ECPGdebug: set to 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database connectdb on port @@ -19,45 +16,45 @@ THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection main closed. [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGconnect: opening database connectdb on localhost port 55432 +[NO_PID]: ECPGconnect: opening database connectdb on localhost port [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection main closed. [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGconnect: opening database on localhost port 55432 for user connectdb +[NO_PID]: ECPGconnect: opening database on localhost port for user connectdb [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection main closed. [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGconnect: opening database connectdb on port 55432 +[NO_PID]: ECPGconnect: opening database connectdb on port [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection main closed. [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGconnect: opening database on port 55432 for user connectdb +[NO_PID]: ECPGconnect: opening database on port for user connectdb [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection main closed. [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGconnect: opening database connectdb on localhost port 55432 for user connectuser +[NO_PID]: ECPGconnect: opening database connectdb on localhost port for user connectuser [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection connectdb closed. [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGconnect: opening database on localhost port 55432 for user connectdb +[NO_PID]: ECPGconnect: opening database on localhost port for user connectdb [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection closed. [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGconnect: opening database connectdb on localhost port 55432 for user connectuser +[NO_PID]: ECPGconnect: opening database connectdb on localhost port for user connectuser [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection connectdb closed. [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGconnect: opening database connectdb on port 55432 for user connectuser +[NO_PID]: ECPGconnect: opening database connectdb on port for user connectuser [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection connectdb closed. [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGconnect: opening database connectdb on port 55432 for user connectuser +[NO_PID]: ECPGconnect: opening database connectdb on port for user connectuser [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: Connection connectdb closed. [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGconnect: opening database nonexistant on localhost port 55432 for user connectuser +[NO_PID]: ECPGconnect: opening database nonexistant on localhost port for user connectuser [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: connect: could not open database nonexistant on localhost port 55432 for user connectuser in line 62 +[NO_PID]: connect: could not open database nonexistant on localhost port for user connectuser in line 62 FATAL: database "nonexistant" does not exist [NO_PID]: sqlca: code: 0, state: 00000 @@ -67,9 +64,9 @@ THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT [NO_PID]: sqlca: code: -402, state: 08001 [NO_PID]: raising sqlcode -220 in line 63, 'No such connection CURRENT in line 63.'. [NO_PID]: sqlca: code: -220, state: 08003 -[NO_PID]: ECPGconnect: opening database connectdb on localhost port 20 for user connectuser +[NO_PID]: ECPGconnect: opening database connectdb on localhost port for user connectuser [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: connect: could not open database connectdb on localhost port 20 for user connectuser in line 66 +[NO_PID]: connect: could not open database connectdb on localhost port for user connectuser in line 66 could not connect to server: Connection refused Is the server running on host "localhost" and accepting TCP/IP connections on port 20? @@ -79,5 +76,5 @@ THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: raising sqlcode -402 in line 66, 'Could not connect to database connectdb in line 66.'. [NO_PID]: sqlca: code: -402, state: 08001 -[NO_PID]: ECPGconnect: opening database connectdb on port 55432 for user connectuser +[NO_PID]: ECPGconnect: opening database connectdb on port for user connectuser [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/connect-test1.stdout b/src/interfaces/ecpg/test/expected/connect-test1.stdout index 3b01e2da3e..e69de29bb2 100644 --- a/src/interfaces/ecpg/test/expected/connect-test1.stdout +++ b/src/interfaces/ecpg/test/expected/connect-test1.stdout @@ -1,3 +0,0 @@ - -THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT - diff --git a/src/interfaces/ecpg/test/expected/connect-test2.c b/src/interfaces/ecpg/test/expected/connect-test2.c index 3ada4a6c71..2a591867ae 100644 --- a/src/interfaces/ecpg/test/expected/connect-test2.c +++ b/src/interfaces/ecpg/test/expected/connect-test2.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/connect-test3.c b/src/interfaces/ecpg/test/expected/connect-test3.c index edef7343b7..ba0cc5529b 100644 --- a/src/interfaces/ecpg/test/expected/connect-test3.c +++ b/src/interfaces/ecpg/test/expected/connect-test3.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/connect-test4.c b/src/interfaces/ecpg/test/expected/connect-test4.c index 89f27691d4..5ebee62355 100644 --- a/src/interfaces/ecpg/test/expected/connect-test4.c +++ b/src/interfaces/ecpg/test/expected/connect-test4.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/connect-test5.c b/src/interfaces/ecpg/test/expected/connect-test5.c index aa326833a3..1335a91991 100644 --- a/src/interfaces/ecpg/test/expected/connect-test5.c +++ b/src/interfaces/ecpg/test/expected/connect-test5.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c index a18399e209..d6bf060aa4 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c index a0e11f7f93..8d9e180e5b 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c index 05c4f846f8..3d06dfdf99 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c index df5b241157..ec8477fdc9 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/preproc-comment.c b/src/interfaces/ecpg/test/expected/preproc-comment.c index d27ea4981c..6bbc77579a 100644 --- a/src/interfaces/ecpg/test/expected/preproc-comment.c +++ b/src/interfaces/ecpg/test/expected/preproc-comment.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/preproc-define.c b/src/interfaces/ecpg/test/expected/preproc-define.c index eb49e1b8d5..a2d1489520 100644 --- a/src/interfaces/ecpg/test/expected/preproc-define.c +++ b/src/interfaces/ecpg/test/expected/preproc-define.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/preproc-init.c b/src/interfaces/ecpg/test/expected/preproc-init.c index 031604cf19..052a4af051 100644 --- a/src/interfaces/ecpg/test/expected/preproc-init.c +++ b/src/interfaces/ecpg/test/expected/preproc-init.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/preproc-type.c b/src/interfaces/ecpg/test/expected/preproc-type.c index 714530bb5c..034787875e 100644 --- a/src/interfaces/ecpg/test/expected/preproc-type.c +++ b/src/interfaces/ecpg/test/expected/preproc-type.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/preproc-variable.c b/src/interfaces/ecpg/test/expected/preproc-variable.c index 370b78231f..0913ecd06b 100644 --- a/src/interfaces/ecpg/test/expected/preproc-variable.c +++ b/src/interfaces/ecpg/test/expected/preproc-variable.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/preproc-whenever.c b/src/interfaces/ecpg/test/expected/preproc-whenever.c index a4ac8ca38b..446541edfb 100644 --- a/src/interfaces/ecpg/test/expected/preproc-whenever.c +++ b/src/interfaces/ecpg/test/expected/preproc-whenever.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/sql-array.c b/src/interfaces/ecpg/test/expected/sql-array.c index 95f0e717cc..7b996b3db8 100644 --- a/src/interfaces/ecpg/test/expected/sql-array.c +++ b/src/interfaces/ecpg/test/expected/sql-array.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/sql-binary.c b/src/interfaces/ecpg/test/expected/sql-binary.c index 68dfcd6d62..418605be6f 100644 --- a/src/interfaces/ecpg/test/expected/sql-binary.c +++ b/src/interfaces/ecpg/test/expected/sql-binary.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/sql-code100.c b/src/interfaces/ecpg/test/expected/sql-code100.c index b7c4be7eee..2368b21f33 100644 --- a/src/interfaces/ecpg/test/expected/sql-code100.c +++ b/src/interfaces/ecpg/test/expected/sql-code100.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/sql-copystdout.c b/src/interfaces/ecpg/test/expected/sql-copystdout.c index cbe309bce7..4ae3e9d92e 100644 --- a/src/interfaces/ecpg/test/expected/sql-copystdout.c +++ b/src/interfaces/ecpg/test/expected/sql-copystdout.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/sql-define.c b/src/interfaces/ecpg/test/expected/sql-define.c index 56e7c0e1aa..e66aa1994b 100644 --- a/src/interfaces/ecpg/test/expected/sql-define.c +++ b/src/interfaces/ecpg/test/expected/sql-define.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/sql-desc.c b/src/interfaces/ecpg/test/expected/sql-desc.c index 6bfa8fbf5e..c735f2749f 100644 --- a/src/interfaces/ecpg/test/expected/sql-desc.c +++ b/src/interfaces/ecpg/test/expected/sql-desc.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc.c b/src/interfaces/ecpg/test/expected/sql-dynalloc.c index 5713d3b104..5fe0584042 100644 --- a/src/interfaces/ecpg/test/expected/sql-dynalloc.c +++ b/src/interfaces/ecpg/test/expected/sql-dynalloc.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc2.c b/src/interfaces/ecpg/test/expected/sql-dynalloc2.c index 349411c05b..7d38c019b2 100644 --- a/src/interfaces/ecpg/test/expected/sql-dynalloc2.c +++ b/src/interfaces/ecpg/test/expected/sql-dynalloc2.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/sql-dyntest.c b/src/interfaces/ecpg/test/expected/sql-dyntest.c index e0815290d5..94d84e76dd 100644 --- a/src/interfaces/ecpg/test/expected/sql-dyntest.c +++ b/src/interfaces/ecpg/test/expected/sql-dyntest.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/sql-execute.c b/src/interfaces/ecpg/test/expected/sql-execute.c index b3e66c4196..0fcc0126ae 100644 --- a/src/interfaces/ecpg/test/expected/sql-execute.c +++ b/src/interfaces/ecpg/test/expected/sql-execute.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/sql-fetch.c b/src/interfaces/ecpg/test/expected/sql-fetch.c index 8f68dd3bfe..b39ac3ffe1 100644 --- a/src/interfaces/ecpg/test/expected/sql-fetch.c +++ b/src/interfaces/ecpg/test/expected/sql-fetch.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/sql-func.c b/src/interfaces/ecpg/test/expected/sql-func.c index 791200cb73..881c2a64e5 100644 --- a/src/interfaces/ecpg/test/expected/sql-func.c +++ b/src/interfaces/ecpg/test/expected/sql-func.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/sql-indicators.c b/src/interfaces/ecpg/test/expected/sql-indicators.c index 8ff6598fd0..ca3fc391e9 100644 --- a/src/interfaces/ecpg/test/expected/sql-indicators.c +++ b/src/interfaces/ecpg/test/expected/sql-indicators.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/sql-quote.c b/src/interfaces/ecpg/test/expected/sql-quote.c index d4a37f309f..5fbf964b57 100644 --- a/src/interfaces/ecpg/test/expected/sql-quote.c +++ b/src/interfaces/ecpg/test/expected/sql-quote.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/sql-show.c b/src/interfaces/ecpg/test/expected/sql-show.c index 3f28af544c..79ff09f176 100644 --- a/src/interfaces/ecpg/test/expected/sql-show.c +++ b/src/interfaces/ecpg/test/expected/sql-show.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/sql-update.c b/src/interfaces/ecpg/test/expected/sql-update.c index e52cc40c91..69052ef8ea 100644 --- a/src/interfaces/ecpg/test/expected/sql-update.c +++ b/src/interfaces/ecpg/test/expected/sql-update.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/thread-thread.c b/src/interfaces/ecpg/test/expected/thread-thread.c index f676b85814..890276c2f8 100644 --- a/src/interfaces/ecpg/test/expected/thread-thread.c +++ b/src/interfaces/ecpg/test/expected/thread-thread.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/expected/thread-thread_implicit.c b/src/interfaces/ecpg/test/expected/thread-thread_implicit.c index ca9bcfe818..21cf8e3c2b 100644 --- a/src/interfaces/ecpg/test/expected/thread-thread_implicit.c +++ b/src/interfaces/ecpg/test/expected/thread-thread_implicit.c @@ -1,4 +1,5 @@ -/* Processed by ecpg (4.3.1) */ +/* Processed by ecpg (regression mode) */ +int ecpg_internal_regression_mode = 1; /* These include files are added by the preprocessor */ #include #include diff --git a/src/interfaces/ecpg/test/pg_regress.sh b/src/interfaces/ecpg/test/pg_regress.sh index 9670ca9b52..108f414088 100644 --- a/src/interfaces/ecpg/test/pg_regress.sh +++ b/src/interfaces/ecpg/test/pg_regress.sh @@ -1,5 +1,5 @@ #! /bin/sh -# $PostgreSQL: pgsql/src/interfaces/ecpg/test/pg_regress.sh,v 1.15 2006/09/26 07:56:56 meskes Exp $ +# $PostgreSQL: pgsql/src/interfaces/ecpg/test/pg_regress.sh,v 1.16 2007/01/11 15:47:33 meskes Exp $ me=`basename $0` @@ -707,7 +707,7 @@ if [ $? -ne 0 ]; then fi # this variable prevents that the PID gets included in the logfiles -ECPG_REGRESSION=1; export ECPG_REGRESSION +#ECPG_REGRESSION=1; export ECPG_REGRESSION LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH DIFFPRETTYFLAGS="$DIFFFLAGS -C3" @@ -753,19 +753,19 @@ for i in \ # so tweak output files and replace the port number (we put a warning # but the price to pay is that we have to tweak the files every time # now not only if the port differs from the standard port). - if [ "$i" = "connect/test1.pgc" ]; then + #if [ "$i" = "connect/test1.pgc" ]; then # can we use sed -i on all platforms? - for f in "$outfile_stderr" "$outfile_stdout" "$outfile_source"; do - mv $f $f.tmp - echo >> $f - echo "THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT" >> $f - echo >> $f + # for f in "$outfile_stderr" "$outfile_stdout" "$outfile_source"; do + # mv $f $f.tmp + # echo >> $f + # echo "THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT" >> $f + # echo >> $f # MinGW could return such a line: # "could not connect to server: Connection refused (0x0000274D/10061)" - cat $f.tmp | sed -e s,$PGPORT,55432,g | sed -e "s,could not connect to server: Connection refused (0x.*/.*),could not connect to server: Connection refused,g" >> $f - rm $f.tmp - done - fi + #cat $f.tmp | sed -e s,$PGPORT,55432,g | sed -e "s,could not connect to server: Connection refused (0x.*/.*),could not connect to server: Connection refused,g" >> $f + # rm $f.tmp + # done + #fi mv "$outfile_source" "$outfile_source.tmp" cat "$outfile_source.tmp" | sed -e 's,^\(#line [0-9]*\) ".*/\([^/]*\)",\1 "\2",' > "$outfile_source"