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



Reply via email to