From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Noah Misch <noah(at)leadboat(dot)com> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Test code is worth the space |
Date: | 2015-08-12 07:39:26 |
Message-ID: | CANP8+jKe3t1PmTD-T_fOCpDeYGPCb9Zgm-SpgV6MNDBzXed0Pw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 12 August 2015 at 03:10, Noah Misch <noah(at)leadboat(dot)com> wrote:
> > On another review I suggested we add a function to core to allow it to be
> > used in regression tests. A long debate ensued, deciding that we must be
> > consistent and put diagnostic functions in contrib. My understanding is
> > that we are not allowed to write regression tests that use contrib
> modules,
> > yet the consistent place to put diagnostic functions is contrib -
> > therefore, we are never allowed to write tests utilizing diagnostic
> > functions. We are allowed to put modules for testing in another
> directory,
> > but these are not distributed to users so cannot be used for production
> > diagnosis. Systemic fail, advice needed.
>
> If you want a user-visible function for production diagnosis, set aside the
> fact that you wish to use it in a test, and find the best place for it.
> Then,
> place the tests with the function. (That is, if the function belongs in
> contrib for other reasons, put tests calling it in the contrib module
> itself.)
>
> Place non-user-visible test support functions in regress.c, or use one of
> the
> options Robert described.
>
That helps, thanks.
--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2015-08-12 07:53:20 | Re: Raising our compiler requirements for 9.6 |
Previous Message | Pavel Stehule | 2015-08-12 07:36:12 | Re: PL/pgSQL, RAISE and error context |