1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

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.
This commit is contained in:
Michael Meskes
2007-01-11 15:47:34 +00:00
parent c0c00ac3b7
commit 5b88b85cad
50 changed files with 249 additions and 128 deletions

View File

@ -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);