On 2/17/18 08:48, Michael Paquier wrote:
> Attached is what I have finished with.  I have gathered the feedback
> from everybody on this thread and I think that the result can satisfy
> all the requirements mentioned:
> - 0001 is a small patch which makes the SSL and LDAP test suite fail
> immediately if the build's ./configure is not set up with necessary
> build options.  This uses TestLib::check_pg_config to do the checks.

I'm not sure why we need that.  The tests will presumably fail anyway.

> - 0002 introduces a new environment variable which can be used to decide
> if an extra test suite can be used or not.  I have named it
> PROVE_EXTRA_ALLOWED, and can be used as such:
> make -C src/test check PROVE_EXTRA_ALLOWED=3D'ssl ldap'
> This includes also some documentation.  Note that with default settings
> the tests are skipped to keep things secure.

I think sticking this into the Perl code is too complicated and
inflexible.  We might want to use the same mechanism for non-TAP tests
as well.

What I had in mind would consist of something like this in
src/test/Makefile:

ifeq ($(with_ldap),yes)
ifneq (,$(filter ldap,$(YOUR_VARIABLE_HERE)))
SUBDIRS += ldap
endif
endif

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Reply via email to