Re: RFC: adding pytest as a supported test framework

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: RFC: adding pytest as a supported test framework
Date: 2024-06-13 20:06:13
Message-ID: 55843b0b-b4c7-4eac-9bef-101aca75466c@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2024-06-12 We 11:28, Andres Freund wrote:
> Hi,
>
> On 2024-06-11 08:04:57 -0400, Andrew Dunstan wrote:
>> Some time ago I did some work on wrapping libpq using the perl FFI module.
>> It worked pretty well, and would mean we could probably avoid many uses of
>> IPC::Run, and would probably be substantially more efficient (no fork
>> required). It wouldn't avoid all uses of IPC::Run, though.
> FWIW, I'd *love* to see work on this continue. The reduction in test runtime
> on windows is substantial and would shorten the hack->CI->fail->hack loop a
> good bit shorter. And save money.

OK, I will put it high on my list. I just did some checking and it seems
to be feasible on Windows. StrawberryPerl at least has FFI::Platypus out
of the box, so we would not need to turn any great handsprings to make
progress on this on a fairly wide variety of platforms.

What seems a good place to start would be a simple
PostgreSQL::Test::Session object that would allow us to get rid of a
whole heap of start/pump_until/kill cycles and deal with the backend in
a much more straightforward and comprehensible way, not to mention the
possibility of removing lots of $node->{safe_}psql calls.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2024-06-13 20:06:44 Re: RFC: adding pytest as a supported test framework
Previous Message David G. Johnston 2024-06-13 20:05:33 Re: improve predefined roles documentation