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

Commit34b788d

Browse files
committed
Give pg_regress a --load-language option, so that it can be used to test
other PLs besides plpgsql. Andrew Dunstan
1 parentcc99c57 commit34b788d

File tree

2 files changed

+25
-13
lines changed

2 files changed

+25
-13
lines changed

‎src/test/regress/GNUmakefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $PostgreSQL: pgsql/src/test/regress/GNUmakefile,v 1.48 2004/11/17 18:05:06 tgl Exp $
10+
# $PostgreSQL: pgsql/src/test/regress/GNUmakefile,v 1.49 2005/05/11 21:52:03 tgl Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -130,17 +130,17 @@ all-spi:
130130
check: all
131131
-rm -rf ./testtablespace
132132
mkdir ./testtablespace
133-
$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE)$(MAXCONNOPT)
133+
$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE)--load-language=plpgsql$(MAXCONNOPT)
134134

135135
installcheck: all
136136
-rm -rf ./testtablespace
137137
mkdir ./testtablespace
138-
$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE)
138+
$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql
139139

140140
installcheck-parallel: all
141141
-rm -rf ./testtablespace
142142
mkdir ./testtablespace
143-
$(SHELL) ./pg_regress --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE)$(MAXCONNOPT)
143+
$(SHELL) ./pg_regress --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE)--load-language=plpgsql$(MAXCONNOPT)
144144

145145

146146
# old interfaces follow...
@@ -150,10 +150,10 @@ runtest: installcheck
150150
runtest-parallel: installcheck-parallel
151151

152152
bigtest:
153-
$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) numeric_big
153+
$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE)--load-language=plpgsqlnumeric_big
154154

155155
bigcheck:
156-
$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE)$(MAXCONNOPT) numeric_big
156+
$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE)--load-language=plpgsql$(MAXCONNOPT) numeric_big
157157

158158

159159
##

‎src/test/regress/pg_regress.sh

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.53 2005/01/15 04:15:51 tgl Exp $
2+
# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.54 2005/05/11 21:52:03 tgl Exp $
33

44
me=`basename$0`
55
:${TMPDIR=/tmp}
@@ -13,6 +13,8 @@ Usage: $me [options...] [extra tests...]
1313
Options:
1414
--debug turn on debug mode in programs that are run
1515
--inputdir=DIR take input files from DIR (default\`.')
16+
--load-language=lang load the named language before running the
17+
tests; can appear multiple times
1618
--max-connections=N maximum number of concurrent connections
1719
(default is 0 meaning unlimited)
1820
--multibyte=ENCODING use ENCODING as the multibyte encoding, and
@@ -103,6 +105,7 @@ unset multibyte
103105
dbname=regression
104106
hostname=localhost
105107
maxconnections=0
108+
load_langs=""
106109

107110
:${GMAKE='@GMAKE@'}
108111

@@ -126,6 +129,11 @@ do
126129
--inputdir=*)
127130
inputdir=`expr"x$1":"x--inputdir=\(.*\)"`
128131
shift;;
132+
--load-language=*)
133+
lang=`expr"x$1":"x--load-language=\(.*\)"`
134+
load_langs="$load_langs$lang"
135+
unset lang
136+
shift;;
129137
--multibyte=*)
130138
multibyte=`expr"x$1":"x--multibyte=\(.*\)"`
131139
shift;;
@@ -560,16 +568,20 @@ fi
560568

561569

562570
# ----------
563-
# Installthe PL/pgSQL language in it
571+
# Installany requested PL languages
564572
# ----------
565573

566574
if ["$enable_shared"= yes ];then
567-
message"installing PL/pgSQL"
568-
"$bindir/createlang" -L"$pkglibdir"$psql_options plpgsql$dbname
569-
if [$?-ne 0 ]&& [$?-ne 2 ];then
570-
echo"$me: createlang failed"
571-
(exit 2);exit
575+
forlangin xyzzy$load_langs;do
576+
if ["$lang"!="xyzzy" ];then
577+
message"installing$lang"
578+
"$bindir/createlang" -L"$pkglibdir"$psql_options$lang$dbname
579+
if [$?-ne 0 ]&& [$?-ne 2 ];then
580+
echo"$me: createlang$lang failed"
581+
(exit 2);exit
582+
fi
572583
fi
584+
done
573585
fi
574586

575587

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp