Skip to content

Commit 0a1f5c0

Browse files
committed
Avoid LDAP TAP tests when not built with LDAP
Since `run_misc_tests()` globs the test directories for test modules and runs them directly, the `if ($ENV{with_ldap} ne 'yes')` bits of the `Makefile` for `ldap_password_func`, at least, doesn't seem to trigger properly. So follow the precedent of checking for SSL configuration and skip LDAP tests when `--with-ldap` (or equivalent) hasn't been specified. This presumably wont't come up previously unless TAP tests were enabled and LDAP was not configured.
1 parent 6d6238f commit 0a1f5c0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

run_build.pl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2501,6 +2501,11 @@ sub run_misc_tests
25012501
? $config_opts->{openssl}
25022502
: (grep { $_ eq '--with-openssl' } @$config_opts);
25032503

2504+
my $using_ldap =
2505+
$using_msvc
2506+
? $config_opts->{ldap}
2507+
: (grep { $_ eq '--with-ldap' } @$config_opts);
2508+
25042509
## no critic (CodeLayout::ProhibitHardTabs)
25052510
foreach my $testdir (
25062511
glob(
@@ -2512,6 +2517,7 @@ sub run_misc_tests
25122517
{
25132518
my $testname = basename($testdir);
25142519
next if $testname =~ /ssl/ && !$using_ssl;
2520+
next if $testname =~ /ldap/ && !$using_ldap;
25152521
next unless -d "$testdir/t";
25162522
next if $using_msvc && $testname eq 'pg_bsd_indent';
25172523
next unless step_wanted("module-$testname");

0 commit comments

Comments
 (0)