Make pg_regress accept a command-line option for the temporary installation's
port number, and use a default value for it that is dependent on the configuration-time DEF_PGPORT. Should make the world safe for running parallel 'make check' in different branches. Back-patch as far as 7.4 so that this actually is useful.
This commit is contained in:
parent
86494de248
commit
027b62384e
@ -7,7 +7,7 @@
|
||||
#
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.43 2003/11/02 21:56:15 tgl Exp $
|
||||
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.43.2.1 2005/07/17 18:29:37 tgl Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -22,6 +22,9 @@ override CFLAGS += $(CFLAGS_SL)
|
||||
|
||||
SHLIB_LINK = $(BE_DLLLIBS)
|
||||
|
||||
# port number for temp-installation test postmaster
|
||||
TEMP_PORT = 5$(DEF_PGPORT)
|
||||
|
||||
# default encoding
|
||||
MULTIBYTE = SQL_ASCII
|
||||
|
||||
@ -119,7 +122,7 @@ all-spi:
|
||||
##
|
||||
|
||||
check: all
|
||||
$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) $(MAXCONNOPT)
|
||||
$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) $(MAXCONNOPT)
|
||||
|
||||
installcheck: all
|
||||
$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE)
|
||||
@ -134,7 +137,7 @@ bigtest:
|
||||
$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) numeric_big
|
||||
|
||||
bigcheck:
|
||||
$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) $(MAXCONNOPT) numeric_big
|
||||
$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) $(MAXCONNOPT) numeric_big
|
||||
|
||||
|
||||
##
|
||||
|
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.36 2003/11/02 21:56:15 tgl Exp $
|
||||
# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.36.2.1 2005/07/17 18:29:37 tgl Exp $
|
||||
|
||||
me=`basename $0`
|
||||
: ${TMPDIR=/tmp}
|
||||
@ -24,6 +24,7 @@ Options:
|
||||
|
||||
Options for \`temp-install' mode:
|
||||
--top-builddir=DIR (relative) path to top level build directory
|
||||
--temp-port=PORT port number to start temp postmaster on
|
||||
|
||||
Options for using an existing installation:
|
||||
--host=HOST use postmaster running on HOST
|
||||
@ -95,6 +96,7 @@ unset multibyte
|
||||
dbname=regression
|
||||
hostname=localhost
|
||||
maxconnections=0
|
||||
temp_port=65432
|
||||
|
||||
: ${GMAKE='@GMAKE@'}
|
||||
|
||||
@ -140,6 +142,9 @@ do
|
||||
--top-builddir=*)
|
||||
top_builddir=`expr "x$1" : "x--top-builddir=\(.*\)"`
|
||||
shift;;
|
||||
--temp-port=*)
|
||||
temp_port=`expr "x$1" : "x--temp-port=\(.*\)"`
|
||||
shift;;
|
||||
--host=*)
|
||||
PGHOST=`expr "x$1" : "x--host=\(.*\)"`
|
||||
export PGHOST
|
||||
@ -311,7 +316,13 @@ then
|
||||
unset PGHOST
|
||||
unset PGHOSTADDR
|
||||
fi
|
||||
PGPORT=65432
|
||||
|
||||
# since Makefile isn't very bright, check for out-of-range temp_port
|
||||
if [ "$temp_port" -ge 1024 -a "$temp_port" -le 65535 ] ; then
|
||||
PGPORT=$temp_port
|
||||
else
|
||||
PGPORT=65432
|
||||
fi
|
||||
export PGPORT
|
||||
|
||||
# Get rid of environment stuff that might cause psql to misbehave
|
||||
|
Loading…
x
Reference in New Issue
Block a user