agora inbox for pgsql-docs@postgresql.org
help / color / mirror / Atom feedDocument how to run only specific regress tests
5+ messages / 4 participants
[nested] [flat]
* Document how to run only specific regress tests
@ 2024-10-29 04:40 Paul A Jungwirth <pj@illuminatedcomputing.com>
2024-10-29 08:28 ` Re: Document how to run only specific regress tests Daniel Gustafsson <daniel@yesql.se>
2024-10-29 08:39 ` Re: Document how to run only specific regress tests jian he <jian.universality@gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Paul A Jungwirth @ 2024-10-29 04:40 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org
I never knew this was possible, but I ran across a note on the meson
wiki page[1]. I wish I knew about it years ago!
This patch adds a note to
https://www.postgresql.org/docs/current/regress-run.html so that other
hackers and potential hackers will know about it.
[1] https://wiki.postgresql.org/wiki/Meson
Yours,
--
Paul ~{:-)
pj@illuminatedcomputing.com
Attachments:
[application/octet-stream] v1-0001-Document-how-to-run-specific-regress-tests.patch (1.1K, ../../CA+renyXB5jYG9r5-CaDc4g607EB398QwTk_efEXTzarrO8bPzw@mail.gmail.com/2-v1-0001-Document-how-to-run-specific-regress-tests.patch)
download | inline diff:
From 3ffd2a878e6380c32192e826f5c62635dc95706c Mon Sep 17 00:00:00 2001
From: "Paul A. Jungwirth" <pj@illuminatedcomputing.com>
Date: Mon, 28 Oct 2024 21:36:22 -0700
Subject: [PATCH v1] Document how to run specific regress tests
Added a section to regress.sgml describing make check-tests and make
installcheck-tests.
---
doc/src/sgml/regress.sgml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/doc/src/sgml/regress.sgml b/doc/src/sgml/regress.sgml
index f4cef9e80f7..bddf3aadc94 100644
--- a/doc/src/sgml/regress.sgml
+++ b/doc/src/sgml/regress.sgml
@@ -125,6 +125,18 @@ make installcheck-parallel
</para>
</sect2>
+ <sect2 id="regress-subset">
+ <title>Running Specific Tests</title>
+
+ <para>
+ You can run a subset of the regression tests by saying
+ <literal>make check-tests TESTS="boolean char"</literal> or
+ <literal>make installcheck-tests TESTS="boolean char"</literal>.
+ Note that sometimes tests depend on each other, so you might get
+ extra failures.
+ </para>
+ </sect2>
+
<sect2 id="regress-additional">
<title>Additional Test Suites</title>
--
2.45.0
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Document how to run only specific regress tests
2024-10-29 04:40 Document how to run only specific regress tests Paul A Jungwirth <pj@illuminatedcomputing.com>
@ 2024-10-29 08:28 ` Daniel Gustafsson <daniel@yesql.se>
2024-10-29 14:53 ` Re: Document how to run only specific regress tests Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Gustafsson @ 2024-10-29 08:28 UTC (permalink / raw)
To: Paul A Jungwirth <pj@illuminatedcomputing.com>; +Cc: pgsql-docs@lists.postgresql.org
> On 29 Oct 2024, at 05:40, Paul A Jungwirth <pj@illuminatedcomputing.com> wrote:
>
> I never knew this was possible, but I ran across a note on the meson
> wiki page[1]. I wish I knew about it years ago!
>
> This patch adds a note to
> https://www.postgresql.org/docs/current/regress-run.html so that other
> hackers and potential hackers will know about it.
While not related to this patch per se, the lack of any meson related
information on that page isn't great.
+ Note that sometimes tests depend on each other, so you might get
+ extra failures.
Reading this pretending I don't know about regression test internals, I think
"extra" would be hard to interpret the meaning of. How about "unexpected"?
--
Daniel Gustafsson
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Document how to run only specific regress tests
2024-10-29 04:40 Document how to run only specific regress tests Paul A Jungwirth <pj@illuminatedcomputing.com>
2024-10-29 08:28 ` Re: Document how to run only specific regress tests Daniel Gustafsson <daniel@yesql.se>
@ 2024-10-29 14:53 ` Tom Lane <tgl@sss.pgh.pa.us>
2024-11-11 01:51 ` Re: Document how to run only specific regress tests jian he <jian.universality@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2024-10-29 14:53 UTC (permalink / raw)
To: Daniel Gustafsson <daniel@yesql.se>; +Cc: Paul A Jungwirth <pj@illuminatedcomputing.com>; pgsql-docs@lists.postgresql.org
Daniel Gustafsson <daniel@yesql.se> writes:
> While not related to this patch per se, the lack of any meson related
> information on that page isn't great.
Indeed. I think this is one of the main unfinished bits of business
for our meson conversion. It's not clear to me that our meson
infrastructure can do all the same testing tricks that the makefiles
can, and for sure it's not documented how.
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Document how to run only specific regress tests
2024-10-29 04:40 Document how to run only specific regress tests Paul A Jungwirth <pj@illuminatedcomputing.com>
2024-10-29 08:28 ` Re: Document how to run only specific regress tests Daniel Gustafsson <daniel@yesql.se>
2024-10-29 14:53 ` Re: Document how to run only specific regress tests Tom Lane <tgl@sss.pgh.pa.us>
@ 2024-11-11 01:51 ` jian he <jian.universality@gmail.com>
0 siblings, 0 replies; 5+ messages in thread
From: jian he @ 2024-11-11 01:51 UTC (permalink / raw)
To: Paul A Jungwirth <pj@illuminatedcomputing.com>; +Cc: Daniel Gustafsson <daniel@yesql.se>; pgsql-docs@lists.postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
hi.
maybe verbose, the following is the my intended changes based on your patch.
what do you think?
<sect2 id="regress-subset">
<title>Running Specific Tests</title>
<para>
You can run a subset of the regression tests through the <envar>TESTS</envar>
environment variable.
One way to do it is set <envar>TESTS</envar> environment variable beforehand:
<screen>
<userinput>export TESTS="test_setup boolean char"</userinput>
</screen>
You can also specify it while invoking the regress tests command,
one of example:
<screen>
make check-tests TESTS="test_setup boolean char"
</screen>
If the <envar>TESTS</envar> environment variable is set when the regression
tests are run, it overrides the original <envar>TESTS</envar> environment
variable.
</para>
<para>
All the regression tests are stored in <filename
class='directory'>src/test/regress/sql</filename>. Each
individual regression test
name is the corresponding file name omit the file name extension
(<literal>.sql</literal>). For example, the regression test name of
<literal>src/test/regress/sql/partition_join.sql</literal> is
<literal>partition_join</literal>. Tests specified by the
<envar>TESTS</envar>
environment variable will be run in a sequential order.
<literal>TESTS="test_setup copy' </literal> will first run
<literal>test_setup</literal> then <literal>copy</literal>. Note that
sometimes one test may depend on other tests, so you might get unexpected
failures if the dependent test is not specified. For example, to run
<literal>select_parallel</literal> test, to avoid failure, you can use
<screen>
make check-tests TESTS="test_setup create_misc create_index select_parallel"
</screen>
</para>
</sect2>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Document how to run only specific regress tests
2024-10-29 04:40 Document how to run only specific regress tests Paul A Jungwirth <pj@illuminatedcomputing.com>
@ 2024-10-29 08:39 ` jian he <jian.universality@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: jian he @ 2024-10-29 08:39 UTC (permalink / raw)
To: Paul A Jungwirth <pj@illuminatedcomputing.com>; +Cc: pgsql-docs@lists.postgresql.org
On Tue, Oct 29, 2024 at 12:40 PM Paul A Jungwirth
<pj@illuminatedcomputing.com> wrote:
>
> I never knew this was possible, but I ran across a note on the meson
> wiki page[1]. I wish I knew about it years ago!
>
> This patch adds a note to
> https://www.postgresql.org/docs/current/regress-run.html so that other
> hackers and potential hackers will know about it.
>
> [1] https://wiki.postgresql.org/wiki/Meson
Thanks for your patch!
you can also check meson TESTS patch in
https://postgr.es/m/CAN55FZ3dSdvujT8yup1C=YOfTATrBrWcLtHmtXupcbog7Va-Xw@mail.gmail.com
Since this is mostly for postgres development, slightly expanding it
would be better.
I think we can also mention that:
1. all the available regress tests are on src/test/regress/sql.
2. regress test name is the same as these files omit file format.
For example "src/test/regress/sql/partition_join.sql" corresponding
regression test name is partition_join
3. individual tests will be executed in that specific order.
TESTS="test_setup copy'
will first execute 'test_setup' then 'copy'
4. Many tests depend on test_setup, some tests depend on create_index.
5. specify duplicate tests may make the tests fail.
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2024-11-11 01:51 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-10-29 04:40 Document how to run only specific regress tests Paul A Jungwirth <pj@illuminatedcomputing.com>
2024-10-29 08:28 ` Daniel Gustafsson <daniel@yesql.se>
2024-10-29 14:53 ` Tom Lane <tgl@sss.pgh.pa.us>
2024-11-11 01:51 ` jian he <jian.universality@gmail.com>
2024-10-29 08:39 ` jian he <jian.universality@gmail.com>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox