Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: Noah Misch <noah@leadboat.com>, Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Michael Paquier <michael.paquier@gmail.com>, Amir Rohan <amir.rohan@zoho.com>, Robert Haas <robertmhaas@gmail.com>, Andres Freund <andres@2ndquadrant.com>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>, Greg Smith <gsmith@gregsmith.com>
Date: 2015-11-29T22:57:17Z
Lists: 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



Commits

  1. Add a test framework for recovery

  2. Refactor Perl test code

  3. pgindent run for 9.5