Provide a --no-locale option for pg_regress and a corresponding NOLOCALE=1
setting for the regression makefile, allowing Windows users to force locale settings since Windows does not get its locale from the environment. Per Petr Jelinek.
This commit is contained in:
parent
37a4232a0c
commit
cad0e824a0
@ -6,7 +6,7 @@
|
|||||||
# Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
# Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||||
# Portions Copyright (c) 1994, Regents of the University of California
|
# Portions Copyright (c) 1994, Regents of the University of California
|
||||||
#
|
#
|
||||||
# $PostgreSQL: pgsql/src/test/regress/GNUmakefile,v 1.52 2005/07/28 04:32:32 tgl Exp $
|
# $PostgreSQL: pgsql/src/test/regress/GNUmakefile,v 1.53 2005/11/01 15:09:11 adunstan Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -28,6 +28,11 @@ ifdef MAX_CONNECTIONS
|
|||||||
MAXCONNOPT += --max-connections=$(MAX_CONNECTIONS)
|
MAXCONNOPT += --max-connections=$(MAX_CONNECTIONS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# locale
|
||||||
|
NOLOCALE :=
|
||||||
|
ifdef NO_LOCALE
|
||||||
|
NOLOCALE += --no-locale
|
||||||
|
endif
|
||||||
|
|
||||||
##
|
##
|
||||||
## Prepare for tests
|
## Prepare for tests
|
||||||
@ -132,17 +137,17 @@ all-spi:
|
|||||||
check: all
|
check: all
|
||||||
-rm -rf ./testtablespace
|
-rm -rf ./testtablespace
|
||||||
mkdir ./testtablespace
|
mkdir ./testtablespace
|
||||||
$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT)
|
$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE)
|
||||||
|
|
||||||
installcheck: all
|
installcheck: all
|
||||||
-rm -rf ./testtablespace
|
-rm -rf ./testtablespace
|
||||||
mkdir ./testtablespace
|
mkdir ./testtablespace
|
||||||
$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql
|
$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
|
||||||
|
|
||||||
installcheck-parallel: all
|
installcheck-parallel: all
|
||||||
-rm -rf ./testtablespace
|
-rm -rf ./testtablespace
|
||||||
mkdir ./testtablespace
|
mkdir ./testtablespace
|
||||||
$(SHELL) ./pg_regress --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT)
|
$(SHELL) ./pg_regress --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE)
|
||||||
|
|
||||||
|
|
||||||
# old interfaces follow...
|
# old interfaces follow...
|
||||||
@ -152,10 +157,10 @@ runtest: installcheck
|
|||||||
runtest-parallel: installcheck-parallel
|
runtest-parallel: installcheck-parallel
|
||||||
|
|
||||||
bigtest:
|
bigtest:
|
||||||
$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql numeric_big
|
$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) numeric_big
|
||||||
|
|
||||||
bigcheck:
|
bigcheck:
|
||||||
$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) numeric_big
|
$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE) numeric_big
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.60 2005/09/05 23:50:49 tgl Exp $
|
# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.61 2005/11/01 15:09:11 adunstan Exp $
|
||||||
|
|
||||||
me=`basename $0`
|
me=`basename $0`
|
||||||
: ${TMPDIR=/tmp}
|
: ${TMPDIR=/tmp}
|
||||||
@ -24,6 +24,7 @@ Options:
|
|||||||
--schedule=FILE use test ordering schedule from FILE
|
--schedule=FILE use test ordering schedule from FILE
|
||||||
(may be used multiple times to concatenate)
|
(may be used multiple times to concatenate)
|
||||||
--temp-install[=DIR] create a temporary installation (in DIR)
|
--temp-install[=DIR] create a temporary installation (in DIR)
|
||||||
|
--no-locale use C locale
|
||||||
|
|
||||||
Options for \`temp-install' mode:
|
Options for \`temp-install' mode:
|
||||||
--top-builddir=DIR (relative) path to top level build directory
|
--top-builddir=DIR (relative) path to top level build directory
|
||||||
@ -99,6 +100,7 @@ fi
|
|||||||
unset mode
|
unset mode
|
||||||
unset schedule
|
unset schedule
|
||||||
unset debug
|
unset debug
|
||||||
|
unset nolocale
|
||||||
unset top_builddir
|
unset top_builddir
|
||||||
unset temp_install
|
unset temp_install
|
||||||
unset multibyte
|
unset multibyte
|
||||||
@ -142,6 +144,9 @@ do
|
|||||||
--multibyte=*)
|
--multibyte=*)
|
||||||
multibyte=`expr "x$1" : "x--multibyte=\(.*\)"`
|
multibyte=`expr "x$1" : "x--multibyte=\(.*\)"`
|
||||||
shift;;
|
shift;;
|
||||||
|
--no-locale)
|
||||||
|
nolocale=yes
|
||||||
|
shift;;
|
||||||
--temp-install)
|
--temp-install)
|
||||||
temp_install=./tmp_check
|
temp_install=./tmp_check
|
||||||
shift;;
|
shift;;
|
||||||
@ -403,7 +408,8 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
message "initializing database system"
|
message "initializing database system"
|
||||||
[ "$debug" = yes ] && initdb_options='--debug'
|
[ "$debug" = yes ] && initdb_options="--debug"
|
||||||
|
[ "$nolocale" = yes ] && initdb_options="$initdb_options --no-locale"
|
||||||
"$bindir/initdb" -D "$PGDATA" -L "$datadir" --noclean $initdb_options >"$LOGDIR/initdb.log" 2>&1
|
"$bindir/initdb" -D "$PGDATA" -L "$datadir" --noclean $initdb_options >"$LOGDIR/initdb.log" 2>&1
|
||||||
|
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user