REGRESS = unaccent
-# Adjust REGRESS_OPTS because we need a UTF8 database
-REGRESS_OPTS = --dbname=$(CONTRIB_TESTDB) --multibyte=UTF8 --no-locale
+# We need a UTF8 database
+ENCODING = UTF8
+NO_LOCALE = 1
ifdef USE_PGXS
PG_CONFIG = pg_config
<para>
You can also choose the database encoding explicitly by setting
- the variable <envar>MULTIBYTE</envar>, for example:
+ the variable <envar>ENCODING</envar>, for example:
<screen>
-gmake check LANG=C MULTIBYTE=EUC_JP
+gmake check LANG=C ENCODING=EUC_JP
</screen>
Setting the database encoding this way typically only makes sense
if the locale is C; otherwise the encoding is chosen automatically
PL_TESTDB = pl_regression
CONTRIB_TESTDB = contrib_regression
-pg_regress_check = $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --temp-install=./tmp_check --top-builddir=$(top_builddir)
-pg_regress_installcheck = $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR)
+ifdef NO_LOCALE
+NOLOCALE += --no-locale
+endif
+
+pg_regress_locale_flags = $(if $(ENCODING),--encoding=$(ENCODING)) $(NOLOCALE)
+
+pg_regress_check = $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --temp-install=./tmp_check --top-builddir=$(top_builddir) $(pg_regress_locale_flags)
+pg_regress_installcheck = $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR) $(pg_regress_locale_flags)
pg_regress_clean_files = results/ regression.diffs regression.out tmp_check/ log/
# where to find psql for testing an existing installation
PSQLDIR = $(bindir)
-# default encoding
-MULTIBYTE = SQL_ASCII
-
-# locale
-NOLOCALE =
-ifdef NO_LOCALE
-NOLOCALE += --no-locale
-endif
+# default encoding for regression tests
+ENCODING = SQL_ASCII
ifneq ($(build_os),mingw32)
abs_builddir := $(shell pwd)
check: all
- ./pg_regress --dbname=regress1,connectdb --top-builddir=$(top_builddir) --temp-install=./tmp_check --multibyte=$(MULTIBYTE) $(NOLOCALE) $(THREAD) --schedule=$(srcdir)/ecpg_schedule --create-role=connectuser,connectdb
+ ./pg_regress --dbname=regress1,connectdb --top-builddir=$(top_builddir) --temp-install=./tmp_check $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule --create-role=connectuser,connectdb
# the same options, but with --listen-on-tcp
checktcp: all
- ./pg_regress --dbname=regress1,connectdb --top-builddir=$(top_builddir) --temp-install=./tmp_check --multibyte=$(MULTIBYTE) $(NOLOCALE) $(THREAD) --schedule=$(srcdir)/ecpg_schedule_tcp --create-role=connectuser,connectdb --host=localhost
+ ./pg_regress --dbname=regress1,connectdb --top-builddir=$(top_builddir) --temp-install=./tmp_check $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule_tcp --create-role=connectuser,connectdb --host=localhost
installcheck: all
- ./pg_regress --psqldir=$(PSQLDIR) --dbname=regress1,connectdb --top-builddir=$(top_builddir) --multibyte=$(MULTIBYTE) $(NOLOCALE) $(THREAD) --schedule=$(srcdir)/ecpg_schedule --create-role=connectuser,connectdb
+ ./pg_regress --psqldir=$(PSQLDIR) --dbname=regress1,connectdb --top-builddir=$(top_builddir) $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule --create-role=connectuser,connectdb
MAXCONNOPT += --max-connections=$(MAX_CONNECTIONS)
endif
-# locale
-NOLOCALE =
-ifdef NO_LOCALE
-NOLOCALE += --no-locale
-endif
-
# stuff to pass into build of pg_regress
EXTRADEFS = '-DHOST_TUPLE="$(host_tuple)"' \
'-DMAKEPROG="$(MAKE)"' \
## Run tests
##
-REGRESS_OPTS = --dlpath=. $(if $(MULTIBYTE),--multibyte=$(MULTIBYTE)) $(NOLOCALE)
+REGRESS_OPTS = --dlpath=.
check: all tablespace-setup
$(pg_regress_check) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(TEMP_CONF) $(EXTRA_TESTS)
putenv("LC_MESSAGES=C");
/*
- * Set multibyte as requested
+ * Set encoding as requested
*/
if (encoding)
doputenv("PGCLIENTENCODING", encoding);
printf(_(" --create-role=ROLE create the specified role before testing\n"));
printf(_(" --max-connections=N maximum number of concurrent connections\n"));
printf(_(" (default is 0 meaning unlimited)\n"));
- printf(_(" --multibyte=ENCODING use ENCODING as the multibyte encoding\n"));
+ printf(_(" --encoding=ENCODING use ENCODING as the encoding\n"));
printf(_(" --outputdir=DIR place output files in DIR (default \".\")\n"));
printf(_(" --schedule=FILE use test ordering schedule from FILE\n"));
printf(_(" (can be used multiple times to concatenate)\n"));
{"inputdir", required_argument, NULL, 3},
{"load-language", required_argument, NULL, 4},
{"max-connections", required_argument, NULL, 5},
- {"multibyte", required_argument, NULL, 6},
+ {"encoding", required_argument, NULL, 6},
{"outputdir", required_argument, NULL, 7},
{"schedule", required_argument, NULL, 8},
{"temp-install", required_argument, NULL, 9},
my @args = (
"../../../$Config/pg_regress/pg_regress","--dlpath=.",
"--psqldir=../../../$Config/psql","--schedule=${schedule}_schedule",
- "--multibyte=SQL_ASCII","--no-locale"
+ "--encoding=SQL_ASCII","--no-locale"
);
push(@args,$maxconn) if $maxconn;
system(@args);
my @args = (
"../../../$Config/pg_regress/pg_regress","--dlpath=.",
"--psqldir=../../../$Config/psql","--schedule=${schedule}_schedule",
- "--multibyte=SQL_ASCII","--no-locale",
+ "--encoding=SQL_ASCII","--no-locale",
"--temp-install=./tmp_check","--top-builddir=\"$topdir\""
);
push(@args,$maxconn) if $maxconn;
"--dbname=regress1,connectdb",
"--create-role=connectuser,connectdb",
"--schedule=${schedule}_schedule",
- "--multibyte=SQL_ASCII",
+ "--encoding=SQL_ASCII",
"--no-locale",
"--temp-install=./tmp_chk",
"--top-builddir=\"$topdir\""