Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf536d41

Browse files
committed
Rename pg_regress option --multibyte to --encoding
Also refactor things a little bit so that the same methods for settingtest locale and encoding can be used everywhere.
1 parent98eded9 commitf536d41

File tree

7 files changed

+25
-30
lines changed

7 files changed

+25
-30
lines changed

‎contrib/unaccent/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ DATA_TSEARCH = unaccent.rules
99

1010
REGRESS = unaccent
1111

12-
# Adjust REGRESS_OPTS because we need a UTF8 database
13-
REGRESS_OPTS = --dbname=$(CONTRIB_TESTDB) --multibyte=UTF8 --no-locale
12+
# We need a UTF8 database
13+
ENCODING = UTF8
14+
NO_LOCALE = 1
1415

1516
ifdefUSE_PGXS
1617
PG_CONFIG = pg_config

‎doc/src/sgml/regress.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ gmake check LC_COLLATE=en_US.utf8 LC_CTYPE=fr_CA.utf8
221221

222222
<para>
223223
You can also choose the database encoding explicitly by setting
224-
the variable <envar>MULTIBYTE</envar>, for example:
224+
the variable <envar>ENCODING</envar>, for example:
225225
<screen>
226-
gmake check LANG=CMULTIBYTE=EUC_JP
226+
gmake check LANG=CENCODING=EUC_JP
227227
</screen>
228228
Setting the database encoding this way typically only makes sense
229229
if the locale is C; otherwise the encoding is chosen automatically

‎src/Makefile.global.in

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,14 @@ submake-libpgport:
430430
PL_TESTDB = pl_regression
431431
CONTRIB_TESTDB = contrib_regression
432432

433-
pg_regress_check =$(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --temp-install=./tmp_check --top-builddir=$(top_builddir)
434-
pg_regress_installcheck =$(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR)
433+
ifdefNO_LOCALE
434+
NOLOCALE += --no-locale
435+
endif
436+
437+
pg_regress_locale_flags =$(if$(ENCODING),--encoding=$(ENCODING))$(NOLOCALE)
438+
439+
pg_regress_check =$(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --temp-install=./tmp_check --top-builddir=$(top_builddir)$(pg_regress_locale_flags)
440+
pg_regress_installcheck =$(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR)$(pg_regress_locale_flags)
435441

436442
pg_regress_clean_files = results/ regression.diffs regression.out tmp_check/ log/
437443

‎src/interfaces/ecpg/test/Makefile

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,8 @@ override CPPFLAGS := \
1616
# where to find psql for testing an existing installation
1717
PSQLDIR =$(bindir)
1818

19-
# default encoding
20-
MULTIBYTE = SQL_ASCII
21-
22-
# locale
23-
NOLOCALE =
24-
ifdefNO_LOCALE
25-
NOLOCALE += --no-locale
26-
endif
19+
# default encoding for regression tests
20+
ENCODING = SQL_ASCII
2721

2822
ifneq ($(build_os),mingw32)
2923
abs_builddir :=$(shell pwd)
@@ -83,11 +77,11 @@ endif
8377

8478

8579
check: all
86-
./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
80+
./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
8781

8882
# the same options, but with --listen-on-tcp
8983
checktcp: all
90-
./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
84+
./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
9185

9286
installcheck: all
93-
./pg_regress --psqldir=$(PSQLDIR) --dbname=regress1,connectdb --top-builddir=$(top_builddir)--multibyte=$(MULTIBYTE)$(NOLOCALE)$(THREAD) --schedule=$(srcdir)/ecpg_schedule --create-role=connectuser,connectdb
87+
./pg_regress --psqldir=$(PSQLDIR) --dbname=regress1,connectdb --top-builddir=$(top_builddir)$(pg_regress_locale_flags)$(THREAD) --schedule=$(srcdir)/ecpg_schedule --create-role=connectuser,connectdb

‎src/test/regress/GNUmakefile

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ ifdef MAX_CONNECTIONS
2929
MAXCONNOPT += --max-connections=$(MAX_CONNECTIONS)
3030
endif
3131

32-
# locale
33-
NOLOCALE =
34-
ifdefNO_LOCALE
35-
NOLOCALE += --no-locale
36-
endif
37-
3832
# stuff to pass into build of pg_regress
3933
EXTRADEFS = '-DHOST_TUPLE="$(host_tuple)"'\
4034
'-DMAKEPROG="$(MAKE)"'\
@@ -138,7 +132,7 @@ tablespace-setup:
138132
## Run tests
139133
##
140134

141-
REGRESS_OPTS = --dlpath=.$(if$(MULTIBYTE),--multibyte=$(MULTIBYTE))$(NOLOCALE)
135+
REGRESS_OPTS = --dlpath=.
142136

143137
check: all tablespace-setup
144138
$(pg_regress_check)$(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule$(MAXCONNOPT)$(TEMP_CONF)$(EXTRA_TESTS)

‎src/test/regress/pg_regress.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ initialize_environment(void)
727727
putenv("LC_MESSAGES=C");
728728

729729
/*
730-
* Setmultibyte as requested
730+
* Setencoding as requested
731731
*/
732732
if (encoding)
733733
doputenv("PGCLIENTENCODING",encoding);
@@ -1880,7 +1880,7 @@ help(void)
18801880
printf(_(" --create-role=ROLE create the specified role before testing\n"));
18811881
printf(_(" --max-connections=N maximum number of concurrent connections\n"));
18821882
printf(_(" (default is 0 meaning unlimited)\n"));
1883-
printf(_(" --multibyte=ENCODING use ENCODING as the multibyte encoding\n"));
1883+
printf(_(" --encoding=ENCODINGuse ENCODING as the encoding\n"));
18841884
printf(_(" --outputdir=DIR place output files in DIR (default \".\")\n"));
18851885
printf(_(" --schedule=FILE use test ordering schedule from FILE\n"));
18861886
printf(_(" (can be used multiple times to concatenate)\n"));
@@ -1925,7 +1925,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
19251925
{"inputdir",required_argument,NULL,3},
19261926
{"load-language",required_argument,NULL,4},
19271927
{"max-connections",required_argument,NULL,5},
1928-
{"multibyte",required_argument,NULL,6},
1928+
{"encoding",required_argument,NULL,6},
19291929
{"outputdir",required_argument,NULL,7},
19301930
{"schedule",required_argument,NULL,8},
19311931
{"temp-install",required_argument,NULL,9},

‎src/tools/msvc/vcregress.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ sub installcheck
8888
my@args = (
8989
"../../../$Config/pg_regress/pg_regress","--dlpath=.",
9090
"--psqldir=../../../$Config/psql","--schedule=${schedule}_schedule",
91-
"--multibyte=SQL_ASCII","--no-locale"
91+
"--encoding=SQL_ASCII","--no-locale"
9292
);
9393
push(@args,$maxconn)if$maxconn;
9494
system(@args);
@@ -101,7 +101,7 @@ sub check
101101
my@args = (
102102
"../../../$Config/pg_regress/pg_regress","--dlpath=.",
103103
"--psqldir=../../../$Config/psql","--schedule=${schedule}_schedule",
104-
"--multibyte=SQL_ASCII","--no-locale",
104+
"--encoding=SQL_ASCII","--no-locale",
105105
"--temp-install=./tmp_check","--top-builddir=\"$topdir\""
106106
);
107107
push(@args,$maxconn)if$maxconn;
@@ -125,7 +125,7 @@ sub ecpgcheck
125125
"--dbname=regress1,connectdb",
126126
"--create-role=connectuser,connectdb",
127127
"--schedule=${schedule}_schedule",
128-
"--multibyte=SQL_ASCII",
128+
"--encoding=SQL_ASCII",
129129
"--no-locale",
130130
"--temp-install=./tmp_chk",
131131
"--top-builddir=\"$topdir\""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp