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

Commitc3382a3

Browse files
committed
Refactor PG_TEST_EXTRA logic in autoconf build
To avoid duplicating the PG_TEST_EXTRA logic in Makefiles into the upcomingmeson based build definition, move the checks into the the teststhemselves. That also has the advantage of making skipped tests visible.Reviewed-by: Peter Eisentraut <peter.eisentraut@enterprisedb.com>Author: Nazir Bilal Yavuz <byavuz81@gmail.com>Author: Andres Freund <andres@anarazel.de>Discussion:https://postgr.es/m/7dae5979-c6c0-cec5-7a36-76a85aa8053d@enterprisedb.com
1 parentbb44a6b commitc3382a3

File tree

6 files changed

+25
-10
lines changed

6 files changed

+25
-10
lines changed

‎src/test/Makefile

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,20 @@ SUBDIRS = perl regress isolation modules authentication recovery subscription
1717
ifeq ($(with_icu),yes)
1818
SUBDIRS += icu
1919
endif
20-
21-
# Test suites that are not safe by default but can be run if selected
22-
# by the user via the whitespace-separated list in variable
23-
# PG_TEST_EXTRA:
2420
ifeq ($(with_gssapi),yes)
25-
ifneq (,$(filter kerberos,$(PG_TEST_EXTRA)))
2621
SUBDIRS += kerberos
2722
endif
28-
endif
2923
ifeq ($(with_ldap),yes)
30-
ifneq (,$(filter ldap,$(PG_TEST_EXTRA)))
3124
SUBDIRS += ldap
3225
endif
33-
endif
3426
ifeq ($(with_ssl),openssl)
35-
ifneq (,$(filter ssl,$(PG_TEST_EXTRA)))
3627
SUBDIRS += ssl
3728
endif
38-
endif
29+
30+
# Test suites that are not safe by default but can be run if selected
31+
# by the user via the whitespace-separated list in variable PG_TEST_EXTRA.
32+
# Export PG_TEST_EXTRA to check it in individual tap tests.
33+
exportPG_TEST_EXTRA
3934

4035
# We don't build or execute these by default, but we do want "make
4136
# clean" etc to recurse into them. (We must filter out those that we

‎src/test/kerberos/t/001_auth.pl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
{
2626
planskip_all=>'GSSAPI/Kerberos not supported by this build';
2727
}
28+
elsif ($ENV{PG_TEST_EXTRA} !~/\bkerberos\b/)
29+
{
30+
planskip_all=>'Potentially unsafe test GSSAPI/Kerberos not enabled in PG_TEST_EXTRA';
31+
}
2832

2933
my ($krb5_bin_dir,$krb5_sbin_dir);
3034

‎src/test/ldap/t/001_auth.pl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
{
1717
planskip_all=>'LDAP not supported by this build';
1818
}
19+
elsif ($ENV{PG_TEST_EXTRA} !~/\bldap\b/)
20+
{
21+
planskip_all=>'Potentially unsafe test LDAP not enabled in PG_TEST_EXTRA';
22+
}
1923
elsif ($^Oeq'darwin' &&-d'/usr/local/opt/openldap')
2024
{
2125
# typical paths for Homebrew

‎src/test/ssl/t/001_ssltests.pl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
{
1818
planskip_all=>'OpenSSL not supported by this build';
1919
}
20+
elsif ($ENV{PG_TEST_EXTRA} !~/ssl/)
21+
{
22+
planskip_all=>'Potentially unsafe test SSL not enabled in PG_TEST_EXTRA';
23+
}
2024

2125
my$ssl_server = SSL::Server->new();
2226

‎src/test/ssl/t/002_scram.pl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
{
2121
planskip_all=>'OpenSSL not supported by this build';
2222
}
23+
elsif ($ENV{PG_TEST_EXTRA} !~/\bssl\b/)
24+
{
25+
planskip_all=>'Potentially unsafe test SSL not enabled in PG_TEST_EXTRA';
26+
}
2327

2428
my$ssl_server = SSL::Server->new();
2529

‎src/test/ssl/t/003_sslinfo.pl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
{
1919
planskip_all=>'OpenSSL not supported by this build';
2020
}
21+
elsif ($ENV{PG_TEST_EXTRA} !~/\bssl\b/)
22+
{
23+
planskip_all=>'Potentially unsafe test SSL not enabled in PG_TEST_EXTRA';
24+
}
2125

2226
#### Some configuration
2327
my$ssl_server = SSL::Server->new();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp