Re: Running a single test

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: jian he <jian(dot)universality(at)gmail(dot)com>, Viktor Holmberg <v(at)viktorh(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Running a single test
Date: 2025-11-18 13:59:20
Message-ID: 1ee2f2a0-1ad8-4bfe-bc9d-1adbf4f76ed1@dunslane.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2025-11-17 Mo 6:57 AM, jian he wrote:
> On Mon, Nov 17, 2025 at 6:27 PM Viktor Holmberg <v(at)viktorh(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Konstantin Knizhnik 2025-11-18 13:59:36 Re: Bug in amcheck?
Previous Message Roman Khapov 2025-11-18 13:51:18 *_LAST in enums to define NUM* macross