Re: Make more portable TAP tests of initdb - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Make more portable TAP tests of initdb
Date
Msg-id 20150414160508.GV4369@alvh.no-ip.org
Whole thread Raw
In response to Make more portable TAP tests of initdb  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Make more portable TAP tests of initdb
List pgsql-hackers
Michael Paquier wrote:
> Hi all,
> 
> I noticed that src/bin/initdb/t/001_initdb.pl uses directly rm via a
> system() call like that:
> system_or_bail "rm -rf '$tempdir'/*";
> 
> This way of doing is not portable, particularly on platforms that do
> not have rm like... Windows where the equivalent is del. And we could
> actually use remove_tree with its option keep_root to get the same
> effect in pure perl as mentioned here:
> http://perldoc.perl.org/File/Path.html
> With this formulation:
> remove_tree($tempdir, {keep_root => 1});

Does Perl 5.8 have this?

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [COMMITTERS] pgsql: Use Intel SSE 4.2 CRC instructions where available.
Next
From: "David E. Wheeler"
Date:
Subject: Re: Make more portable TAP tests of initdb