Re: [HACKERS] WIP patch for avoiding duplicate initdb runs during "make check"
On Mon, Jul 3, 2017 at 11:00 PM, Tom Lanewrote: > Michael Paquier writes: >> On Mon, Jul 3, 2017 at 9:25 PM, Greg Stark wrote: >>> On 2 July 2017 at 18:33, Tom Lane wrote: system("cp -a ...") call in favor of something more portable. > >>> If we're ok with using Perl there's File::Copy::Recursive::dircopy() >>> which does exactly that. > >> This stuff needs to support perl down to 5.8.0, and that's a reason >> behind having src/test/perl/RecursiveCopy.pm. So I would suggest just >> to use that. cp is not portable on Windows as well, that's a recipe >> for non-portable code there. This was under the assumption of "if we use perl" :) > I can't see going this path in pg_regress, because then you would have > exactly zero test functionality in a non-Perl build. Indeed, release tarballs don't need perl to work. So that's a no-go. > What I had in > mind was a frontend-friendly version of backend/storage/file/copydir.c, > either just dropped into pg_regress.c or put in src/common/. +1 for src/common/. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] WIP patch for avoiding duplicate initdb runs during "make check"
Michael Paquierwrites: > On Mon, Jul 3, 2017 at 9:25 PM, Greg Stark wrote: >> On 2 July 2017 at 18:33, Tom Lane wrote: >>> system("cp -a ...") call in favor of something more portable. >> If we're ok with using Perl there's File::Copy::Recursive::dircopy() >> which does exactly that. > This stuff needs to support perl down to 5.8.0, and that's a reason > behind having src/test/perl/RecursiveCopy.pm. So I would suggest just > to use that. cp is not portable on Windows as well, that's a recipe > for non-portable code there. I can't see going this path in pg_regress, because then you would have exactly zero test functionality in a non-Perl build. What I had in mind was a frontend-friendly version of backend/storage/file/copydir.c, either just dropped into pg_regress.c or put in src/common/. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] WIP patch for avoiding duplicate initdb runs during "make check"
On Mon, Jul 3, 2017 at 10:02 PM, Alvaro Herrerawrote: > Tom Lane wrote: > >> (Other unfinished work: teaching the MSVC scripts to use this, >> and teaching pg_upgrade's test script to use it.) > > Maybe it'd be simpler to rewrite pg_upgrade tests using PostgresNode > instead? You are looking for this patch: https://commitfest.postgresql.org/14/1101/ And for this thread: https://www.postgresql.org/message-id/flat/cab7npqrdan1a1ynjxnl9t1juewct8ttqq29dnv8w_o37+e8...@mail.gmail.com -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] WIP patch for avoiding duplicate initdb runs during "make check"
Tom Lane wrote: > (Other unfinished work: teaching the MSVC scripts to use this, > and teaching pg_upgrade's test script to use it.) Maybe it'd be simpler to rewrite pg_upgrade tests using PostgresNode instead? -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] WIP patch for avoiding duplicate initdb runs during "make check"
On Mon, Jul 3, 2017 at 9:25 PM, Greg Starkwrote: > On 2 July 2017 at 18:33, Tom Lane wrote: >> system("cp -a ...") call in favor of something more portable. > > If we're ok with using Perl there's File::Copy::Recursive::dircopy() > which does exactly that. This stuff needs to support perl down to 5.8.0, and that's a reason behind having src/test/perl/RecursiveCopy.pm. So I would suggest just to use that. cp is not portable on Windows as well, that's a recipe for non-portable code there. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] WIP patch for avoiding duplicate initdb runs during "make check"
On 2 July 2017 at 18:33, Tom Lanewrote: > system("cp -a ...") call in favor of something more portable. If we're ok with using Perl there's File::Copy::Recursive::dircopy() which does exactly that. -- greg -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers