Re: Make more portable TAP tests of initdb

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Make more portable TAP tests of initdb
Date: 2015-04-14 16:05:08
Message-ID: 20150414160508.GV4369@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2015-04-14 16:25:33 Re: Make more portable TAP tests of initdb
Previous Message Simon Riggs 2015-04-14 16:01:56 Re: [COMMITTERS] pgsql: Use Intel SSE 4.2 CRC instructions where available.