Thread
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
doc: Document how to run a subset of regress tests
- 20bff3d7945e 19 (unreleased) landed
-
Running a single test
Viktor Holmberg <v@viktorh.net> — 2025-11-17T10:26:59Z
Hello hackers Apologies if this is a n00b question - but really can’t find anything about it in the docs. I can run all the regression tests with `make test`. But is there a way to run a single specific test? It’d be nice to do this for example when adding extra assertions to a test, without touching the code. /Viktor Holmberg
-
Re: Running a single test
Heikki Linnakangas <hlinnaka@iki.fi> — 2025-11-17T10:55:06Z
On 17/11/2025 12:26, Viktor Holmberg wrote: > Hello hackers > > Apologies if this is a n00b question - but really can’t find anything > about it in the docs. > I can run all the regression tests with `make test`. But is there a way > to run a single specific test? > It’d be nice to do this for example when adding extra assertions to a > test, without touching the code. The main test suite that 'make check' runs is quick enough that usually I just run them all. But sometimes if I want to iterate quickly on a single test, I modify "parallel_schedule", commenting out all the other tests, and then use "make check". You could also call the pg_regress program directly and pass the name of the test as an argument, but I find it easier to just modify parallel_schedule. "make check-world" takes a little longer. If you want to run just one of the test suites that that executes, you can run "make check" in the right subdirectory. For example, "(cd src/bin/pg_config; make check)" See also the corresponding instructions for meson builds at https://wiki.postgresql.org/wiki/Meson#Test_related_commands. Meson is much better at running the "world" test suites in parallel, and faster to compile anyway, so I highly recommend switching to meson. - Heikki
-
Re: Running a single test
Aleksander Alekseev <aleksander@tigerdata.com> — 2025-11-17T11:15:52Z
Hi Victor, > Apologies if this is a n00b question - but really can’t find anything about it in the docs. > I can run all the regression tests with `make test`. But is there a way to run a single specific test? > It’d be nice to do this for example when adding extra assertions to a test, without touching the code. I would recommend using Meson. It's much faster and Autotools support will be removed in the future. I have a little cheat sheet on the subject [1]. It's in Russian but Google Translate will help. For instance you can do: ``` meson test -C build --suite postgresql:test_slru 'test_slru/regress' ``` If you believe there is room for improvement in the official documentation, patches are welcome. [1]: https://eax.me/2022/2022-12-19-postgresql-meson.html -- Best regards, Aleksander Alekseev
-
Re: Running a single test
jian he <jian.universality@gmail.com> — 2025-11-17T11:57:27Z
On Mon, Nov 17, 2025 at 6:27 PM Viktor Holmberg <v@viktorh.net> wrote: > > Hello hackers > > Apologies if this is a n00b question - but really can’t find anything about it in the docs. > I can run all the regression tests with `make test`. But is there a way to run a single specific test? > It’d be nice to do this for example when adding extra assertions to a test, without touching the code. > hi. run test_setup.sql, boolean.sql, char.sql tests only you can use make check-tests TESTS="test_setup boolean char" this is not documented, see https://postgr.es/m/CA+renyXB5jYG9r5-CaDc4g607EB398QwTk_efEXTzarrO8bPzw@mail.gmail.com meson, there is patch available: https://commitfest.postgresql.org/patch/5405/ after apply the patch, you can use meson test -C $your_build_dir --suite setup --verbose TESTS='test_setup boolean char' meson test -C $your_build_dir --suite regress --verbose
-
Re: Running a single test
Viktor Holmberg <v@viktorh.net> — 2025-11-18T08:55:31Z
Thank you both. I was not aware of meson at all, I had some idea that it was something used exclusively by the CI server. FWIW, that doc patch would have helped me! /Viktor
-
Re: Running a single test
Daniel Gustafsson <daniel@yesql.se> — 2025-11-18T09:11:04Z
> On 18 Nov 2025, at 09:55, Viktor Holmberg <v@viktorh.net> wrote: > FWIW, that doc patch would have helped me! Maybe we should resurrect it then, I tweaked it a fraction to better match the language in that section. -- Daniel Gustafsson
-
Re: Running a single test
Viktor Holmberg <v@viktorh.net> — 2025-11-18T09:47:49Z
On 18 Nov 2025 at 10:11 +0100, Daniel Gustafsson <daniel@yesql.se>, wrote: > > On 18 Nov 2025, at 09:55, Viktor Holmberg <v@viktorh.net> wrote: > > FWIW, that doc patch would have helped me! > > > > Maybe we should resurrect it then, I tweaked it a fraction to better match the > > language in that section. > > > > -- > > Daniel Gustafsson Looks good!
-
Re: Running a single test
Nazir Bilal Yavuz <byavuz81@gmail.com> — 2025-11-18T10:03:07Z
Hi, On Tue, 18 Nov 2025 at 12:11, Daniel Gustafsson <daniel@yesql.se> wrote: > > > On 18 Nov 2025, at 09:55, Viktor Holmberg <v@viktorh.net> wrote: > > > FWIW, that doc patch would have helped me! Postgres wiki page [1] has nice information too. > > Maybe we should resurrect it then, I tweaked it a fraction to better match the > language in that section. +1 for this change. Patch LGTM. [1] https://wiki.postgresql.org/wiki/Meson#Test_related_commands -- Regards, Nazir Bilal Yavuz Microsoft
-
Re: Running a single test
Andrew Dunstan <andrew@dunslane.net> — 2025-11-18T13:59:20Z
On 2025-11-17 Mo 6:57 AM, jian he wrote: > On Mon, Nov 17, 2025 at 6:27 PM Viktor Holmberg <v@viktorh.net> wrote: >> Hello hackers >> >> Apologies if this is a n00b question - but really can’t find anything about it in the docs. >> I can run all the regression tests with `make test`. But is there a way to run a single specific test? >> It’d be nice to do this for example when adding extra assertions to a test, without touching the code. >> > hi. > > run test_setup.sql, boolean.sql, char.sql tests only > you can use > > make check-tests TESTS="test_setup boolean char" > > this is not documented, see > https://postgr.es/m/CA+renyXB5jYG9r5-CaDc4g607EB398QwTk_efEXTzarrO8bPzw@mail.gmail.com > > > meson, > there is patch available: > https://commitfest.postgresql.org/patch/5405/ > > after apply the patch, you can use > meson test -C $your_build_dir --suite setup --verbose > TESTS='test_setup boolean char' meson test -C $your_build_dir --suite > regress --verbose > > I'm off for a couple of days, but intending to commit this later this week unless someone beats me to it. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com