Re: meson: Optionally disable installation of test modules

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: meson: Optionally disable installation of test modules
Date: 2023-01-31 08:44:03
Message-ID: 90063fe9-ee92-274c-d20d-49bad001bbb3@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 30.01.23 18:42, Andres Freund wrote:
> On 2023-01-30 08:37:42 +0100, Peter Eisentraut wrote:
>> One open issue (IMO) with the meson build system is that it installs the
>> test modules under src/test/modules/ as part of a normal installation. This
>> is because there is no way to set up up the build system to install extra
>> things only when told. I think we still need a way to disable this somehow,
>> so that building a production installation doesn't end up with a bunch of
>> extra files.
>>
>> The attached simple patch is a starting point for discussion. It just
>> disables the subdirectory src/test/modules/ based on some Boolean setting.
>> This could be some new top-level option, or maybe part of PG_TEST_EXTRA, or
>> something else? With this, I get an identical set of installed files from
>> meson. I imagine this option would be false by default and developers would
>> enable it.
>
> Bilal, with a bit of help by me, worked on an alternative approach to
> this. It's a lot more verbose in the initial change, but wouldn't increase the
> amount of work/lines for new test modules. The main advantage is that we
> wouldn't have disable the modules by default, which I think would be quite
> likely to result in plenty people not running the tests.
>
> Sending a link instead of attaching, in case you already registered a cfbot entry:
> https://github.com/anarazel/postgres/commit/d1d192a860da39af9aa63d7edf643eed0eeee7c4
>
> Probably worth adding an install-test-modules target for manual use.

Looks like a good idea. I'm happy to proceed along that line.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message gkokolatos 2023-01-31 09:00:56 Re: Add LZ4 compression in pg_dump
Previous Message Kyotaro Horiguchi 2023-01-31 08:10:46 Re: Time delayed LR (WAS Re: logical replication restrictions)