Skip to content

Commit a76d0cc

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 3c523d3 commit a76d0cc

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
@@ -2486,6 +2486,11 @@ sub run_misc_tests
24862486
? $config_opts->{openssl}
24872487
: (grep { $_ eq '--with-openssl' } @$config_opts);
24882488

2489+
my $using_ldap =
2490+
$using_msvc
2491+
? $config_opts->{ldap}
2492+
: (grep { $_ eq '--with-ldap' } @$config_opts);
2493+
24892494
## no critic (CodeLayout::ProhibitHardTabs)
24902495
foreach my $testdir (
24912496
glob(
@@ -2497,6 +2502,7 @@ sub run_misc_tests
24972502
{
24982503
my $testname = basename($testdir);
24992504
next if $testname =~ /ssl/ && !$using_ssl;
2505+
next if $testname =~ /ldap/ && !$using_ldap;
25002506
next unless -d "$testdir/t";
25012507
next if $using_msvc && $testname eq 'pg_bsd_indent';
25022508
next unless step_wanted("module-$testname");

0 commit comments

Comments
 (0)