From a76d0ccc2f6f6761e981af233a143a11a5bcb59f Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Mon, 30 Jun 2025 17:22:05 -0400 Subject: [PATCH] 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. --- run_build.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/run_build.pl b/run_build.pl index 7cfa9ce..e25f0d6 100755 --- a/run_build.pl +++ b/run_build.pl @@ -2486,6 +2486,11 @@ sub run_misc_tests ? $config_opts->{openssl} : (grep { $_ eq '--with-openssl' } @$config_opts); + my $using_ldap = + $using_msvc + ? $config_opts->{ldap} + : (grep { $_ eq '--with-ldap' } @$config_opts); + ## no critic (CodeLayout::ProhibitHardTabs) foreach my $testdir ( glob( @@ -2497,6 +2502,7 @@ sub run_misc_tests { my $testname = basename($testdir); next if $testname =~ /ssl/ && !$using_ssl; + next if $testname =~ /ldap/ && !$using_ldap; next unless -d "$testdir/t"; next if $using_msvc && $testname eq 'pg_bsd_indent'; next unless step_wanted("module-$testname");