Hi all,

In order to run tests consistently on the whole tree, I use a simple
alias which tests also things like src/test/ssl and src/test/ldap on the
way.

Lately, I am getting annoyed by $subject when working on OpenSSL stuff
as sometimes I need to test things with and without SSL support to make
sure that a patch is rightly shaped.  However if configure is built
without SSL support then src/test/ssl just fails.  The same applies to
src/test/ldap.

Could it be possible to disable them using something like the attached
if a build is done without SSL and/or LDAP?

Thanks,
--
Michael
diff --git a/configure.in b/configure.in
index 4d26034579..aee3ab0867 100644
--- a/configure.in
+++ b/configure.in
@@ -682,6 +682,7 @@ PGAC_ARG_BOOL(with, ldap, no,
               [build with LDAP support],
               [AC_DEFINE([USE_LDAP], 1, [Define to 1 to build with LDAP support. (--with-ldap)])])
 AC_MSG_RESULT([$with_ldap])
+AC_SUBST(with_ldap)
 
 
 #
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index d980f81046..dcb8dc5d90 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -186,6 +186,7 @@ with_tcl	= @with_tcl@
 with_openssl	= @with_openssl@
 with_selinux	= @with_selinux@
 with_systemd	= @with_systemd@
+with_ldap	= @with_ldap@
 with_libxml	= @with_libxml@
 with_libxslt	= @with_libxslt@
 with_system_tzdata = @with_system_tzdata@
diff --git a/src/test/ldap/Makefile b/src/test/ldap/Makefile
index fef5742b82..983b37e71a 100644
--- a/src/test/ldap/Makefile
+++ b/src/test/ldap/Makefile
@@ -14,10 +14,18 @@ top_builddir = ../../..
 include $(top_builddir)/src/Makefile.global
 
 check:
+ifeq ($(with_ldap),yes)
 	$(prove_check)
+else
+	@echo "No tests as LDAP is not supported."
+endif
 
 installcheck:
+ifeq ($(with_ldap),yes)
 	$(prove_installcheck)
+else
+	@echo "No tests as LDAP is not supported."
+endif
 
 clean distclean maintainer-clean:
 	rm -rf tmp_check
diff --git a/src/test/ssl/Makefile b/src/test/ssl/Makefile
index 4e9095529a..87872d07ae 100644
--- a/src/test/ssl/Makefile
+++ b/src/test/ssl/Makefile
@@ -131,7 +131,15 @@ clean distclean maintainer-clean:
 	rm -rf tmp_check
 
 check:
+ifeq ($(with_openssl),yes)
 	$(prove_check)
+else
+	@echo "No tests as OpenSSL is not supported."
+endif
 
 installcheck:
+ifeq ($(with_openssl),yes)
 	$(prove_installcheck)
+else
+	@echo "No tests as OpenSSL is not supported."
+endif

Attachment: signature.asc
Description: PGP signature

Reply via email to