Re: meson and check-tests

From: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, Tristan Partin <tristan(at)partin(dot)io>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: meson and check-tests
Date: 2024-10-31 17:58:18
Message-ID: CAN55FZ2gH_4D0idwfoNN2jB50JrzA+fUTBcOp3Qx-ihCDnY=xg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Ashutosh and Jian,

Sorry for the late reply and thanks for the feedback!

On Fri, 4 Oct 2024 at 16:13, jian he <jian(dot)universality(at)gmail(dot)com> wrote:
>
> v3, 0001 documentation:
> We can at least write something on
> https://wiki.postgresql.org/wiki/Meson about this feature.

I agree. It seems that I need to apply for an editor access on the
wiki page. I am planning to do that after the commit.

> TESTS='check check_btree' meson test amcheck/regress --verbose
> works, but I feel like there is a discoverability issue .
>
> TESTS='check check_btree' meson test amcheck/regress --list --verbose
> shows:
> postgresql:amcheck / amcheck/regress
>
>
> For small tests, listing all the available tests would be great.

I agree but unfortunately this seems not possible. 'meson test --list'
option only shows tests that are registered to meson build (i.e.
test() calls in the meson.build files).

On Fri, 4 Oct 2024 at 18:40, Ashutosh Bapat
<ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
> --schedule or the test selection becomes part of the test command
> itself in the current master. By passing it as an argument, in these
> patches, we are allowing those to be overridden if TESTS is set at the
> time of running the test. I like this idea. I was pondering whether we
> really need two separate arguments --schedule and --tests
> respectively. IIUC, we can't pass them as a single argument (say
> --test-selection or --selection) because the subsequent --schedule
> would be treated as a separate argument if not quoted correctly. That
> isn't a problem with value of tests. To avoid quoting '--schedule
> ...', we have two separate arguments. Am I right?

Yes, that is exactly why we have both '--schedule' and '--tests'
flags. Also, a comment is added to clarify this.

> It might be better to make this explicit in the code -- by making sure
> that only one of them is passed and writing a comment about it.
> ArgumentParser might have some trick to specify that passing both the
> arguments is an error.

I did not understand why only one of them needed to be passed at a
time. For example in ecpg tests
(src/interfaces/ecpg/test/meson.build), both '--schedule' and
'--tests' options are passed.

> Also I don't think "Note that setup
> # suite tests (at least tmp_install and initdb_cache tests) may need to be run
> # before running these tests." is needed. This is true irrespective of
> whether we specify TESTS or not.

Done.

--
Regards,
Nazir Bilal Yavuz
Microsoft

Attachment Content-Type Size
v4-0001-Add-make-check-tests-behavior-to-the-meson-based-.patch text/x-patch 3.7 KB
v4-0002-Expand-test-selection-behavior-to-all-test-types-.patch text/x-patch 1.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Banck 2024-10-31 18:01:54 [PATCH] Add support for displaying database service in psql prompt
Previous Message Tom Lane 2024-10-31 17:53:16 Re: Changing the default random_page_cost value