Re: RFC: adding pytest as a supported test framework - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: RFC: adding pytest as a supported test framework
Date
Msg-id b97c4db7-adba-4ad6-8a50-cf7e2cfdb740@dunslane.net
Whole thread Raw
In response to Re: RFC: adding pytest as a supported test framework  (Andres Freund <andres@anarazel.de>)
Responses Re: RFC: adding pytest as a supported test framework
Re: RFC: adding pytest as a supported test framework
List pgsql-hackers


On 2024-06-10 Mo 21:49, Andres Freund wrote:
Hi,

On 2024-06-10 16:46:56 -0400, Andrew Dunstan wrote:
On 2024-06-10 Mo 16:04, Andres Freund wrote:
Hi,


Just for context for the rest the email: I think we desperately need to move
off perl for tests. The infrastructure around our testing is basically
unmaintained and just about nobody that started doing dev stuff in the last 10
years learned perl.
Andres,

I get that you don't like perl.
I indeed don't particularly like perl - but that's really not the main
issue. I've already learned [some of] it. What is the main issue is that I've
also watched several newer folks try to write tests in it, and it was not
pretty.


Hmm. I've done webinars in the past about how to write TAP tests for PostgreSQL, maybe I need to beef that up some.


I'm not sure what part of the testing infrastructure you think is
unmaintained. For example, the last release of Test::Simple was all the way
back on April 25.
IPC::Run is quite buggy and basically just maintained by Noah these days.


Yes, that's true. I think the biggest pain point is possibly the recovery tests.

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.

But my point was mainly that while a new framework might have value, I don't think we need to run out and immediately rewrite several hundred TAP tests. Let's pick the major pain points and address those.


cheers


andrew

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

pgsql-hackers by date:

Previous
From: Kashif Zeeshan
Date:
Subject: Re: ODBC Source Downloads Missing
Next
From: Melih Mutlu
Date:
Subject: Re: Speed up JSON escape processing with SIMD plus other optimisations