Add checks in each test file that the build supports the feature,
otherwise skip all the tests. Before, if someone were to (accidentally)
invoke these tests without build support, they would fail in confusing
ways.
based on patch from Michael Paquier <
[email protected]>
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
+export with_ldap
+
check:
$(prove_check)
use warnings;
use TestLib;
use PostgresNode;
-use Test::More tests => 19;
+use Test::More;
+
+if ($ENV{with_ldap} eq 'yes')
+{
+ plan tests => 19;
+}
+else
+{
+ plan skip_all => 'LDAP not supported by this build';
+}
my ($slapd, $ldap_bin_dir, $ldap_schema_dir);
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
+export with_openssl
+
CERTIFICATES := server_ca server-cn-and-alt-names \
server-cn-only server-single-alt-name server-multiple-alt-names \
server-no-names server-revoked server-ss \
use warnings;
use PostgresNode;
use TestLib;
-use Test::More tests => 62;
+use Test::More;
use ServerSetup;
use File::Copy;
+if ($ENV{with_openssl} eq 'yes')
+{
+ plan tests => 62;
+}
+else
+{
+ plan skip_all => 'SSL not supported by this build';
+}
+
#### Some configuration
# This is the hostname used to connect to the server. This cannot be a
use warnings;
use PostgresNode;
use TestLib;
-use Test::More tests => 6;
+use Test::More;
use ServerSetup;
use File::Copy;
+if ($ENV{with_openssl} eq 'yes')
+{
+ plan tests => 6;
+}
+else
+{
+ plan skip_all => 'SSL not supported by this build';
+}
+
# This is the hostname used to connect to the server.
my $SERVERHOSTADDR = '127.0.0.1';