Skip to content

Commit e0a39a1

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 422584c commit e0a39a1

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
@@ -108,18 +108,6 @@ PGDATA="$BASE_PGDATA.old"
108108
export PGDATA
109109
rm -rf "$BASE_PGDATA" "$PGDATA"
110110

111-
# Send installcheck outputs to a private directory. This avoids conflict when
112-
# check-world runs pg_upgrade check concurrently with src/test/regress check.
113-
# To retrieve interesting files after a run, use pattern tmp_check/*/*.diffs.
114-
outputdir="$temp_root/regress"
115-
EXTRA_REGRESS_OPTS="$EXTRA_REGRESS_OPTS --outputdir=$outputdir"
116-
export EXTRA_REGRESS_OPTS
117-
rm -rf "$outputdir"
118-
mkdir "$outputdir"
119-
mkdir "$outputdir"/sql
120-
mkdir "$outputdir"/expected
121-
mkdir "$outputdir"/testtablespace
122-
123111
logdir=`pwd`/log
124112
rm -rf "$logdir"
125113
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
@@ -101,13 +101,6 @@
101101
sub installcheck
102102
{
103103
my $schedule = shift || 'serial';
104-
installcheck_internal $schedule;
105-
return;
106-
}
107-
108-
sub installcheck_internal
109-
{
110-
my ($schedule, @EXTRA_REGRESS_OPTS) = @_;
111104
my @args = (
112105
"../../../$Config/pg_regress/pg_regress",
113106
"--dlpath=.",
@@ -116,7 +109,6 @@ sub installcheck_internal
116109
"--encoding=SQL_ASCII",
117110
"--no-locale");
118111
push(@args, $maxconn) if $maxconn;
119-
push(@args, @EXTRA_REGRESS_OPTS);
120112
system(@args);
121113
my $status = $? >> 8;
122114
exit $status if $status;
@@ -521,14 +513,6 @@ sub upgradecheck
521513
$ENV{PATH} = "$bindir;$ENV{PATH}";
522514
my $data = "$tmp_root/data";
523515
$ENV{PGDATA} = "$data.old";
524-
my $outputdir = "$tmp_root/regress";
525-
my @EXTRA_REGRESS_OPTS = ("--outputdir=$outputdir");
526-
rmtree("$outputdir");
527-
mkdir "$outputdir" || die $!;
528-
mkdir "$outputdir/sql" || die $!;
529-
mkdir "$outputdir/expected" || die $!;
530-
mkdir "$outputdir/testtablespace" || die $!;
531-
532516
my $logdir = "$topdir/src/bin/pg_upgrade/log";
533517
(mkdir $logdir || die $!) unless -d $logdir;
534518
print "\nRunning initdb on old cluster\n\n";
@@ -543,7 +527,7 @@ sub upgradecheck
543527
generate_db('', 91, 127, '');
544528

545529
print "\nSetting up data for upgrading\n\n";
546-
installcheck_internal('serial', @EXTRA_REGRESS_OPTS);
530+
installcheck();
547531

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

0 commit comments

Comments
 (0)