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

Commitfdb3482

Browse files
committed
Add PG_TEST_EXTRA to control optional test suites
The SSL and LDAP test suites are not run by default, as they are notsecure for multi-user environments. This commit adds an extra makevariable to optionally enable them, for example:make check-world PG_TEST_EXTRA='ldap ssl'Author: Michael Paquier <michael@paquier.xyz>
1 parent0b1d1a0 commitfdb3482

File tree

5 files changed

+61
-5
lines changed

5 files changed

+61
-5
lines changed

‎configure

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,7 @@ with_uuid
708708
with_systemd
709709
with_selinux
710710
with_openssl
711+
with_ldap
711712
krb_srvtab
712713
with_python
713714
with_perl
@@ -5925,6 +5926,7 @@ fi
59255926
$as_echo"$with_ldap">&6; }
59265927

59275928

5929+
59285930
#
59295931
# Bonjour
59305932
#

‎configure.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,7 @@ PGAC_ARG_BOOL(with, ldap, no,
682682
[build with LDAP support],
683683
[AC_DEFINE([USE_LDAP], 1, [Define to 1 to build with LDAP support. (--with-ldap)])])
684684
AC_MSG_RESULT([$with_ldap])
685+
AC_SUBST(with_ldap)
685686

686687

687688
#

‎doc/src/sgml/regress.sgml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,44 @@ make installcheck-world
211211
option <option>--enable-tap-tests</option>. This is recommended for
212212
development, but can be omitted if there is no suitable Perl installation.
213213
</para>
214+
215+
<para>
216+
Some test suites are not run by default, either because they are not secure
217+
to run on a multiuser system or because they require special software. You
218+
can decide which test suites to run additionally by setting the
219+
<command>make</command> or environment variable
220+
<varname>PG_TEST_EXTRA</varname> to a whitespace-separated list, for
221+
example:
222+
<programlisting>
223+
make check-world PG_TEST_EXTRA='ldap ssl'
224+
</programlisting>
225+
The following values are currently supported:
226+
<variablelist>
227+
<varlistentry>
228+
<term><literal>ldap</literal></term>
229+
<listitem>
230+
<para>
231+
Runs the test suite under <filename>src/test/ldap</filename>. This
232+
requires an <productname>OpenLDAP</productname> installation and opens
233+
TCP/IP listen sockets.
234+
</para>
235+
</listitem>
236+
</varlistentry>
237+
238+
<varlistentry>
239+
<term><literal>ssl</literal></term>
240+
<listitem>
241+
<para>
242+
Runs the test suite under <filename>src/test/ssl</filename>. This opens TCP/IP listen sockets.
243+
</para>
244+
</listitem>
245+
</varlistentry>
246+
</variablelist>
247+
248+
Tests for features that are not supported by the current build
249+
configuration are not run even if they are mentioned in
250+
<varname>PG_TEST_EXTRA</varname>.
251+
</para>
214252
</sect2>
215253

216254
<sect2>

‎src/Makefile.global.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ with_tcl= @with_tcl@
186186
with_openssl= @with_openssl@
187187
with_selinux= @with_selinux@
188188
with_systemd= @with_systemd@
189+
with_ldap= @with_ldap@
189190
with_libxml= @with_libxml@
190191
with_libxslt= @with_libxslt@
191192
with_system_tzdata = @with_system_tzdata@

‎src/test/Makefile

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,25 @@ include $(top_builddir)/src/Makefile.global
1414

1515
SUBDIRS = perl regress isolation modules authentication recovery subscription
1616

17-
# We don't build or execute examples/, locale/, or thread/ by default,
18-
# but we do want "make clean" etc to recurse into them. Likewise for
19-
# ldap/ and ssl/, because these test suites are not secure to run on a
20-
# multi-user system.
21-
ALWAYS_SUBDIRS = examples ldap locale thread ssl
17+
# Test suites that are not safe by default but can be run if selected
18+
# by the user via the whitespace-separated list in variable
19+
# PG_TEST_EXTRA:
20+
ifeq ($(with_ldap),yes)
21+
ifneq (,$(filter ldap,$(PG_TEST_EXTRA)))
22+
SUBDIRS += ldap
23+
endif
24+
endif
25+
ifeq ($(with_openssl),yes)
26+
ifneq (,$(filter ssl,$(PG_TEST_EXTRA)))
27+
SUBDIRS += ssl
28+
endif
29+
endif
30+
31+
# We don't build or execute these by default, but we do want "make
32+
# clean" etc to recurse into them. (We must filter out those that we
33+
# have conditionally included into SUBDIRS above, else there will be
34+
# make confusion.)
35+
ALWAYS_SUBDIRS =$(filter-out$(SUBDIRS),examples ldap locale thread ssl)
2236

2337
# We want to recurse to all subdirs for all standard targets, except that
2438
# installcheck and install should not recurse into the subdirectory "modules".

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp