Skip to content

Commit ae35e1c

Browse files
committed
Revert "In the pg_upgrade test suite, don't write to src/test/regress."
This reverts commit bd1592e. It had multiple defects. Discussion: https://postgr.es/m/12717.1558304356@sss.pgh.pa.us
1 parent c3b23ae commit ae35e1c

File tree

5 files changed

+10
-38
lines changed

5 files changed

+10
-38
lines changed

src/bin/pg_upgrade/test.sh

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,6 @@ PGDATA="${BASE_PGDATA}.old"
110110
export PGDATA
111111
rm -rf "$BASE_PGDATA" "$PGDATA"
112112

113-
# Send installcheck outputs to a private directory. This avoids conflict when
114-
# check-world runs pg_upgrade check concurrently with src/test/regress check.
115-
# To retrieve interesting files after a run, use pattern tmp_check/*/*.diffs.
116-
outputdir="$temp_root/regress"
117-
EXTRA_REGRESS_OPTS="$EXTRA_REGRESS_OPTS --outputdir=$outputdir"
118-
export EXTRA_REGRESS_OPTS
119-
rm -rf "$outputdir"
120-
mkdir "$outputdir"
121-
mkdir "$outputdir"/sql
122-
mkdir "$outputdir"/expected
123-
mkdir "$outputdir"/testtablespace
124-
125113
logdir=`pwd`/log
126114
rm -rf "$logdir"
127115
mkdir "$logdir"

src/test/regress/input/largeobject.source

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,12 @@ END;
203203

204204
SELECT lo_export(loid, '@abs_builddir@/results/lotest.txt') FROM lotest_stash_values;
205205

206-
\lo_import '@abs_builddir@/results/lotest.txt'
206+
\lo_import 'results/lotest.txt'
207207

208208
\set newloid :LASTOID
209209

210210
-- just make sure \lo_export does not barf
211-
\lo_export :newloid '@abs_builddir@/results/lotest2.txt'
211+
\lo_export :newloid 'results/lotest2.txt'
212212

213213
-- This is a hack to test that export/import are reversible
214214
-- This uses knowledge about the inner workings of large object mechanism
@@ -223,7 +223,7 @@ TRUNCATE lotest_stash_values;
223223

224224
\lo_unlink :newloid
225225

226-
\lo_import '@abs_builddir@/results/lotest.txt'
226+
\lo_import 'results/lotest.txt'
227227

228228
\set newloid_1 :LASTOID
229229

src/test/regress/output/largeobject.source

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,10 @@ SELECT lo_export(loid, '@abs_builddir@/results/lotest.txt') FROM lotest_stash_va
385385
1
386386
(1 row)
387387

388-
\lo_import '@abs_builddir@/results/lotest.txt'
388+
\lo_import 'results/lotest.txt'
389389
\set newloid :LASTOID
390390
-- just make sure \lo_export does not barf
391-
\lo_export :newloid '@abs_builddir@/results/lotest2.txt'
391+
\lo_export :newloid 'results/lotest2.txt'
392392
-- This is a hack to test that export/import are reversible
393393
-- This uses knowledge about the inner workings of large object mechanism
394394
-- which should not be used outside it. This makes it a HACK
@@ -407,7 +407,7 @@ SELECT lo_unlink(loid) FROM lotest_stash_values;
407407

408408
TRUNCATE lotest_stash_values;
409409
\lo_unlink :newloid
410-
\lo_import '@abs_builddir@/results/lotest.txt'
410+
\lo_import 'results/lotest.txt'
411411
\set newloid_1 :LASTOID
412412
SELECT lo_from_bytea(0, lo_get(:newloid_1)) AS newloid_2
413413
\gset

src/test/regress/output/largeobject_1.source

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,10 @@ SELECT lo_export(loid, '@abs_builddir@/results/lotest.txt') FROM lotest_stash_va
385385
1
386386
(1 row)
387387

388-
\lo_import '@abs_builddir@/results/lotest.txt'
388+
\lo_import 'results/lotest.txt'
389389
\set newloid :LASTOID
390390
-- just make sure \lo_export does not barf
391-
\lo_export :newloid '@abs_builddir@/results/lotest2.txt'
391+
\lo_export :newloid 'results/lotest2.txt'
392392
-- This is a hack to test that export/import are reversible
393393
-- This uses knowledge about the inner workings of large object mechanism
394394
-- which should not be used outside it. This makes it a HACK
@@ -407,7 +407,7 @@ SELECT lo_unlink(loid) FROM lotest_stash_values;
407407

408408
TRUNCATE lotest_stash_values;
409409
\lo_unlink :newloid
410-
\lo_import '@abs_builddir@/results/lotest.txt'
410+
\lo_import 'results/lotest.txt'
411411
\set newloid_1 :LASTOID
412412
SELECT lo_from_bytea(0, lo_get(:newloid_1)) AS newloid_2
413413
\gset

src/tools/msvc/vcregress.pl

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,6 @@
102102
sub installcheck
103103
{
104104
my $schedule = shift || 'serial';
105-
installcheck_internal $schedule;
106-
return;
107-
}
108-
109-
sub installcheck_internal
110-
{
111-
my ($schedule, @EXTRA_REGRESS_OPTS) = @_;
112105
my @args = (
113106
"../../../$Config/pg_regress/pg_regress",
114107
"--dlpath=.",
@@ -118,7 +111,6 @@ sub installcheck_internal
118111
"--encoding=SQL_ASCII",
119112
"--no-locale");
120113
push(@args, $maxconn) if $maxconn;
121-
push(@args, @EXTRA_REGRESS_OPTS);
122114
system(@args);
123115
my $status = $? >> 8;
124116
exit $status if $status;
@@ -566,14 +558,6 @@ sub upgradecheck
566558
$ENV{PATH} = "$bindir;$ENV{PATH}";
567559
my $data = "$tmp_root/data";
568560
$ENV{PGDATA} = "$data.old";
569-
my $outputdir = "$tmp_root/regress";
570-
my @EXTRA_REGRESS_OPTS = ("--outputdir=$outputdir");
571-
rmtree("$outputdir");
572-
mkdir "$outputdir" || die $!;
573-
mkdir "$outputdir/sql" || die $!;
574-
mkdir "$outputdir/expected" || die $!;
575-
mkdir "$outputdir/testtablespace" || die $!;
576-
577561
my $logdir = "$topdir/src/bin/pg_upgrade/log";
578562
(mkdir $logdir || die $!) unless -d $logdir;
579563
print "\nRunning initdb on old cluster\n\n";
@@ -588,7 +572,7 @@ sub upgradecheck
588572
generate_db('', 91, 127, '');
589573

590574
print "\nSetting up data for upgrading\n\n";
591-
installcheck_internal('parallel', @EXTRA_REGRESS_OPTS);
575+
installcheck('parallel');
592576

593577
# now we can chdir into the source dir
594578
chdir "$topdir/src/bin/pg_upgrade";

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy