Documenting PROVE_TESTS in section of TAP tests

Started by Michael Paquieralmost 8 years ago4 messages
#1Michael Paquier
michael@paquier.xyz
1 attachment(s)

Hi all,

The section of the documentation dedicated to TAP tests mentions
PROVE_FLAGS:
https://www.postgresql.org/docs/devel/static/regress-tap.html

I think that it would be a good idea to mention PROVE_TESTS as well. I
personally use and abuse of it, and documenting it instead of keeping it
hidden in Makefile.global.in is good for new developers and testers.

Proposal of patch attached.

Thanks,
--
Michael

Attachments:

tap-document-prove-tests.patchtext/x-diff; charset=us-asciiDownload
diff --git a/doc/src/sgml/regress.sgml b/doc/src/sgml/regress.sgml
index 53716a029f..d14318053b 100644
--- a/doc/src/sgml/regress.sgml
+++ b/doc/src/sgml/regress.sgml
@@ -675,6 +675,17 @@ make -C src/bin check PROVE_FLAGS='--timer'
     See the manual page of <command>prove</command> for more information.
    </para>
 
+   <para>
+    The <command>make</command> variable <varname>PROVE_TESTS</varname>
+    can be used to define a whitespace-separated list of paths relative
+    to the <filename>Makefile</filename> invoking <command>prove</command>
+    to run a subset of tests instead of the default
+    <filename>t/*.pl</filename>.  For example:
+<programlisting>
+make check PROVE_TESTS='t/001_test1.pl t/003_test3.pl'
+</programlisting>
+   </para>
+
    <para>
     The TAP tests require the Perl module <literal>IPC::Run</literal>.
     This module is available from CPAN or an operating system package.
#2Craig Ringer
craig@2ndquadrant.com
In reply to: Michael Paquier (#1)
Re: Documenting PROVE_TESTS in section of TAP tests

On 17 February 2018 at 22:03, Michael Paquier <michael@paquier.xyz> wrote:

Hi all,

The section of the documentation dedicated to TAP tests mentions
PROVE_FLAGS:
https://www.postgresql.org/docs/devel/static/regress-tap.html

I think that it would be a good idea to mention PROVE_TESTS as well. I
personally use and abuse of it, and documenting it instead of keeping it
hidden in Makefile.global.in is good for new developers and testers.

Proposal of patch attached.

Good plan. I thought it was already mentioned, but that mention is only
in src/test/perl/README where I doubt people routinely running the tests
will see it. I think I put it there mainly to help people writing/fixing
tests.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

#3Andres Freund
andres@anarazel.de
In reply to: Michael Paquier (#1)
Re: Documenting PROVE_TESTS in section of TAP tests

Hi,

On 2018-02-17 23:03:05 +0900, Michael Paquier wrote:

The section of the documentation dedicated to TAP tests mentions
PROVE_FLAGS:
https://www.postgresql.org/docs/devel/static/regress-tap.html

I think that it would be a good idea to mention PROVE_TESTS as well. I
personally use and abuse of it, and documenting it instead of keeping it
hidden in Makefile.global.in is good for new developers and testers.

Proposal of patch attached.

Good plan.

diff --git a/doc/src/sgml/regress.sgml b/doc/src/sgml/regress.sgml
index 53716a029f..d14318053b 100644
--- a/doc/src/sgml/regress.sgml
+++ b/doc/src/sgml/regress.sgml
@@ -675,6 +675,17 @@ make -C src/bin check PROVE_FLAGS='--timer'
See the manual page of <command>prove</command> for more information.
</para>
+   <para>
+    The <command>make</command> variable <varname>PROVE_TESTS</varname>
+    can be used to define a whitespace-separated list of paths relative
+    to the <filename>Makefile</filename> invoking <command>prove</command>
+    to run a subset of tests instead of the default
+    <filename>t/*.pl</filename>.  For example:
+<programlisting>
+make check PROVE_TESTS='t/001_test1.pl t/003_test3.pl'
+</programlisting>
+   </para>
+

Pushed, after replacing "a subset" with "the specified subset".

Greetings,

Andres Freund

#4Michael Paquier
michael@paquier.xyz
In reply to: Andres Freund (#3)
Re: Documenting PROVE_TESTS in section of TAP tests

On Thu, Mar 01, 2018 at 01:52:09AM -0800, Andres Freund wrote:

Pushed, after replacing "a subset" with "the specified subset".

Thanks, Andres.
--
Michael