Re: pg_basebackup test coverage - Mailing list pgsql-hackers

From Robert Haas
Subject Re: pg_basebackup test coverage
Date
Msg-id CA+TgmoZKx9M4VN3+=Xpu2JUOCdzNM-uTCkynxd8b6uky4Ju8aw@mail.gmail.com
Whole thread Raw
In response to Re: pg_basebackup test coverage  (Michael Paquier <michael@paquier.xyz>)
Responses Re: pg_basebackup test coverage
Re: pg_basebackup test coverage
List pgsql-hackers
On Fri, Dec 11, 2020 at 3:04 AM Michael Paquier <michael@paquier.xyz> wrote:
> Why don't you just use Archive::Tar [1] instead of looking for some system
> commands?  Combining list_files() with extract(), it is possible to
> extract an archive, with or without compression, without hoping for an
> equivalent to exist on Windows.  That would not be the first time
> either that there is a TAP test that skips some tests if a module does
> not exist.  See for example what psql does with IO::Pty.

Well, either this or Noah's method has the disadvantage that not
everyone will get the benefit of the tests, and that those who wish to
get that benefit must install more stuff. But, all three of the
computers I have within arm's reach (yeah, I might have a problem)
have Archive::Tar installed, so maybe it's not a big concern in
practice. I am slightly inclined to think that the perl package
approach might be better than shell commands because perhaps it is
more likely to work on Windows, but I'm not positive.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Clean up ancient test style
Next
From: Fujii Masao
Date:
Subject: Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit