Commit 35eb0958 authored by Peter Eisentraut's avatar Peter Eisentraut

Don't run regression tests in SQL_ASCII encoding by default

Instead, run them in the encoding that the locale selects, which is
more representative of real use.

Also document how locale and encoding for regression test runs can be
selected.
parent a0423ec0
...@@ -194,6 +194,48 @@ gmake standbycheck ...@@ -194,6 +194,48 @@ gmake standbycheck
Additional automated testing may be available in later releases. Additional automated testing may be available in later releases.
</para> </para>
</sect2> </sect2>
<sect2>
<title>Locale and encoding</title>
<para>
By default, the tests against a temporary installation use the
locale defined in the current environment and the corresponding
database encoding as determined by <command>initdb</command>. It
can be useful to test different locales by setting the appropriate
environment variables, for example:
<screen>
gmake check LANG=C
gmake check LC_COLLATE=en_US.utf8 LC_CTYPE=fr_CA.utf8
</screen>
For implementation reasons, setting <envar>LC_ALL</envar> does not
work for this purpose; all the other locale-related environment
variables do work.
</para>
<para>
When testing against an existing installation, the locale is
determined by the existing database cluster and cannot be set
separately for the test run.
</para>
<para>
You can also choose the database encoding explicitly by setting
the variable <envar>MULTIBYTE</envar>, for example:
<screen>
gmake check LANG=C MULTIBYTE=EUC_JP
</screen>
Setting the database encoding this way typically only makes sense
if the locale is C; otherwise the encoding is chosen automatically
from the locale, and specifying an encoding that does not match
the locale will result in an error.
</para>
<para>
The encoding can be set for tests against a temporary or an
existing installation.
</para>
</sect2>
</sect1> </sect1>
<sect1 id="regress-evaluation"> <sect1 id="regress-evaluation">
......
...@@ -23,9 +23,6 @@ endif ...@@ -23,9 +23,6 @@ endif
# where to find psql for testing an existing installation # where to find psql for testing an existing installation
PSQLDIR = $(bindir) PSQLDIR = $(bindir)
# default encoding
MULTIBYTE = SQL_ASCII
# maximum simultaneous connections for parallel tests # maximum simultaneous connections for parallel tests
MAXCONNOPT = MAXCONNOPT =
ifdef MAX_CONNECTIONS ifdef MAX_CONNECTIONS
...@@ -141,7 +138,7 @@ tablespace-setup: ...@@ -141,7 +138,7 @@ tablespace-setup:
## Run tests ## Run tests
## ##
pg_regress_call = ./pg_regress --inputdir=$(srcdir) --dlpath=. --multibyte=$(MULTIBYTE) $(NOLOCALE) pg_regress_call = ./pg_regress --inputdir=$(srcdir) --dlpath=. $(if $(MULTIBYTE),--multibyte=$(MULTIBYTE)) $(NOLOCALE)
check: all tablespace-setup check: all tablespace-setup
$(pg_regress_call) --temp-install=./tmp_check --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(TEMP_CONF) $(pg_regress_call) --temp-install=./tmp_check --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(TEMP_CONF)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment