Re: meson: Optionally disable installation of test modules - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: meson: Optionally disable installation of test modules
Date
Msg-id 171839a2-fa29-f399-d028-b34c2d34c3f8@enterprisedb.com
Whole thread Raw
In response to Re: meson: Optionally disable installation of test modules  (Andres Freund <andres@anarazel.de>)
Responses Re: meson: Optionally disable installation of test modules
List pgsql-hackers
On 20.02.23 20:48, Andres Freund wrote:
> On 2023-02-20 19:43:56 +0100, Peter Eisentraut wrote:
>> I don't think any callers try to copy a directory source, so the
>> shutil.copytree() stuff isn't necessary.
> 
> I'd like to use it for installing docs outside of the normal install
> target. Of course we could add the ability at a later point, but that seems a
> bit pointless back-forth to me.

I figured it could be useful as a general installation tool, but the 
current script has specific command-line options for this specific 
purpose, so I don't think it would work for your purpose anyway.

For the purpose here, we really just need something that does

     for src in sys.argv[1:-1]:
         shutil.copy2(src, sys.argv[-1])

But we need to call it twice for different sets of files and 
destinations, and since we can't have more than one command per test, we 
either need to write two "tests" or write a wrapper script like the one 
we have here.

I don't know what the best way to slice this is, but it's not a lot of 
code that we couldn't move around again in the future.




pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Fix GUC_NO_SHOW_ALL test scenario in 003_check_guc.pl
Next
From: Peter Eisentraut
Date:
Subject: Re: meson: Non-feature feature options