0001-Remove-REGRESS_OUTPUTDIR-environment-variable.not-for-cfbot-patch

application/octet-stream

Filename: 0001-Remove-REGRESS_OUTPUTDIR-environment-variable.not-for-cfbot-patch
Type: application/octet-stream
Part: 0
Message: Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set
From dfd80e6cb9f0be2856f5f16ba9a69e6efa97ebe8 Mon Sep 17 00:00:00 2001
From: Thomas Munro <thomas.munro@gmail.com>
Date: Mon, 14 Feb 2022 10:10:06 +1300
Subject: [PATCH] Remove REGRESS_OUTPUTDIR environment variable.

Andres Freund points out that the tmp_check path is already available as
perl variable PostgreSQL::Test::Utils::tmp_check, so we can drop the new
environment variable introduced by commit f47ed79cc.

Discussion: https://postgr.es/m/20220213052955.dh7lheehit7bsemf%40alap3.anarazel.de
---
 src/test/recovery/Makefile                | 4 ----
 src/test/recovery/t/027_stream_regress.pl | 2 +-
 src/tools/msvc/vcregress.pl               | 2 --
 3 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/test/recovery/Makefile b/src/test/recovery/Makefile
index 4eb12e0583..da5b9ff397 100644
--- a/src/test/recovery/Makefile
+++ b/src/test/recovery/Makefile
@@ -19,10 +19,6 @@ include $(top_builddir)/src/Makefile.global
 REGRESS_SHLIB=$(abs_top_builddir)/src/test/regress/regress$(DLSUFFIX)
 export REGRESS_SHLIB
 
-# required for 027_stream_regress.pl
-REGRESS_OUTPUTDIR=$(abs_top_builddir)/src/test/recovery/tmp_check
-export REGRESS_OUTPUTDIR
-
 check:
 	$(prove_check)
 
diff --git a/src/test/recovery/t/027_stream_regress.pl b/src/test/recovery/t/027_stream_regress.pl
index c0aae707ea..4f82a54f93 100644
--- a/src/test/recovery/t/027_stream_regress.pl
+++ b/src/test/recovery/t/027_stream_regress.pl
@@ -49,7 +49,7 @@ $node_standby_1->append_conf('postgresql.conf',
 $node_standby_1->start;
 
 my $dlpath = PostgreSQL::Test::Utils::perl2host(dirname($ENV{REGRESS_SHLIB}));
-my $outputdir = PostgreSQL::Test::Utils::perl2host($ENV{REGRESS_OUTPUTDIR});
+my $outputdir = PostgreSQL::Test::Utils::perl2host($PostgreSQL::Test::Utils::tmp_check);
 
 # Run the regression tests against the primary.
 my $extra_opts = $ENV{EXTRA_REGRESS_OPTS} || "";
diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl
index ddce4680a9..a994626239 100644
--- a/src/tools/msvc/vcregress.pl
+++ b/src/tools/msvc/vcregress.pl
@@ -536,8 +536,6 @@ sub recoverycheck
 {
 	InstallTemp();
 
-	$ENV{REGRESS_OUTPUTDIR} = "$topdir/src/test/recovery/tmp_check";
-
 	my $dir    = "$topdir/src/test/recovery";
 	my $status = tap_check($dir);
 	exit $status if $status;
-- 
2.33.1