Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc. - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.
Date
Msg-id 565B82CD.6040602@dunslane.net
Whole thread Raw
In response to Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.  (Noah Misch <noah@leadboat.com>)
Responses Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.
List pgsql-hackers

On 11/29/2015 04:28 PM, Noah Misch wrote:
> +BEGIN
> +{
> +    $windows_os = $Config{osname} eq 'MSWin32' || $Config{osname} eq 'msys';
> +
> +    # Determine output directories, and create them.  The base path is the
> +    # TESTDIR environment variable, which is normally set by the invoking
> +    # Makefile.
> +    $tmp_check = $ENV{TESTDIR} ? "$ENV{TESTDIR}/tmp_check" : "tmp_check";
> +    $log_path = "$tmp_check/log";
> +
> +    mkdir $tmp_check;
> +    mkdir $log_path;
> Never mutate the filesystem in a BEGIN block, because "perl -c" runs BEGIN
> blocks.  (Likewise for the BEGIN block this patch adds to TestLib.)


Yeah, those two lines might belong in an INIT block. "perldoc perlmod" 
for details.


cheers

andrew




pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: WIP: Make timestamptz_out less slow.
Next
From: Rodrigo Hjort
Date:
Subject: Issue on C function that reads int2[] (using "int2vector")