Re: In-core regression tests for replication, cascading, archiving, PITR, etc.

From: Victor Wagner <vitus(at)wagner(dot)pp(dot)ru>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.
Date: 2016-02-04 18:13:46
Message-ID: 20160204211346.3876b416@wagner.wagner.home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 4 Feb 2016 18:33:27 +0300
Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote:

> > Really, it is not so hard to add configure checks for perl modules.
> > And we need to test not only for IPC::Run, but for Test::More too,
> > because some Linux distributions put modules which come with perl
> > into separate package.
>
> The last time we discussed about that on this list we concluded that
> it was not really necessary to have such checks, for one it makes the
> code more simple, and because this is leveraged by the presence of
> --enable-tap-tests, tests which can get actually costly with
> check-world. But this is digressing the subject of this thread, which
> deals with the fact of having recovery tests integrated in core...

Of course, such configure tests should be run only if
--enable-tap-tests is passed to the configure script

It would look like

if test "$enable_tap_tests" = "yes"; then
AX_PROG_PERL_MODULES( Test::More, , AC_MSG_ERROR([Test::More is
necessary to run TAP Tests])
AX_PROG_PERL_MODULES( IPC::Run, , AC_MSG_ERROR([IPC::Run is
necessary to run TAP Tests])
fi

in the configure.in

May be it is not strictly necessary, but it is really useful to see
such problems as clear error message during configure stage, rather
than successfully configure, compile, run tests and only then find out,
that something is forgotten.

I don't see why having such tests in the configure.in, makes code more
complex. It just prevents configure to finish successfully if
--enable-tap-tests is specified and required modules are not available.

--
Victor Wagner <vitus(at)wagner(dot)pp(dot)ru>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Victor Wagner 2016-02-04 18:18:41 Re: [REVIEW] In-core regression tests for replication, cascading, archiving, PITR, etc.
Previous Message Tom Lane 2016-02-04 18:12:01 Re: UNIQUE capability to hash indexes