@@ -108,15 +108,12 @@ sub installcheck
108108
109109sub check
110110{
111- chdir $startdir ;
112-
113111InstallTemp();
114112chdir " ${topdir} /src/test/regress" ;
115-
116113my @args = (
117- " ${tmp_installdir} /bin /pg_regress" ,
114+ " ../../../ $Config /pg_regress /pg_regress" ,
118115" --dlpath=." ,
119- " --bindir=${tmp_installdir} /bin " ,
116+ " --bindir=" ,
120117" --schedule=${schedule} _schedule" ,
121118" --encoding=SQL_ASCII" ,
122119" --no-locale" ,
@@ -136,11 +133,9 @@ sub ecpgcheck
136133exit $status if $status ;
137134InstallTemp();
138135chdir " $topdir /src/interfaces/ecpg/test" ;
139-
140- $ENV {PATH } =" ${tmp_installdir} /bin;${tmp_installdir} /lib;$ENV {PATH}" ;
141136$schedule =" ecpg" ;
142137my @args = (
143- " ${tmp_installdir} /bin /pg_regress_ecpg" ,
138+ " ../../../../ $Config /pg_regress_ecpg /pg_regress_ecpg" ,
144139" --bindir=" ,
145140" --dbname=regress1,connectdb" ,
146141" --create-role=connectuser,connectdb" ,
@@ -156,14 +151,12 @@ sub ecpgcheck
156151
157152sub isolationcheck
158153{
159- chdir $startdir ;
160-
161- InstallTemp();
162- chdir " ${topdir} /src/test/isolation" ;
163-
154+ chdir " ../isolation" ;
155+ copy(" ../../../$Config /isolationtester/isolationtester.exe" ,
156+ " ../../../$Config /pg_isolation_regress" );
164157my @args = (
165- " ${tmp_installdir} /bin /pg_isolation_regress" ,
166- " --bindir=${tmp_installdir} /bin " ,
158+ " ../../../ $Config /pg_isolation_regress /pg_isolation_regress" ,
159+ " --bindir=../../../ $Config /psql " ,
167160" --inputdir=." ,
168161" --schedule=./isolation_schedule" );
169162push (@args ,$maxconn )if $maxconn ;
@@ -174,10 +167,7 @@ sub isolationcheck
174167
175168sub plcheck
176169{
177- chdir $startdir ;
178-
179- InstallTemp();
180- chdir " ${topdir} /src/pl" ;
170+ chdir " ../../pl" ;
181171
182172foreach my $pl (glob (" *" ))
183173{
@@ -214,8 +204,8 @@ sub plcheck
214204" ============================================================\n " ;
215205print " Checking$lang \n " ;
216206my @args = (
217- " ${tmp_installdir} /bin /pg_regress" ,
218- " --bindir=${tmp_installdir} /bin " ,
207+ " ../../../ $Config /pg_regress /pg_regress" ,
208+ " --bindir=../../../ $Config /psql " ,
219209" --dbname=pl_regression" ,@lang_args ,@tests );
220210system (@args );
221211my $status =$? >> 8;
@@ -230,7 +220,6 @@ sub subdircheck
230220{
231221my $subdir =shift ;
232222my $module =shift ;
233- my $mstat = 0;
234223
235224if ( !-d " $module /sql"
236225|| !-d " $module /expected"
@@ -277,24 +266,19 @@ sub subdircheck
277266print " ============================================================\n " ;
278267print " Checking$module \n " ;
279268my @args = (
280- " ${tmp_installdir} /bin /pg_regress" ,
281- " --bindir=${tmp_installdir} /bin " ,
269+ " $topdir / $Config /pg_regress /pg_regress" ,
270+ " --bindir=${topdir} / ${Config} /psql " ,
282271" --dbname=contrib_regression" ,@opts ,@tests );
283272system (@args );
284- my $status =$? >> 8;
285- $mstat ||=$status ;
286273chdir " .." ;
287-
288- exit $mstat if $mstat ;
289274}
290275
291276sub contribcheck
292277{
293- InstallTemp() ;
294- chdir " $topdir /contrib " ;
278+ chdir " ../../../contrib " ;
279+ my $mstat = 0 ;
295280foreach my $module (glob (" *" ))
296281{
297-
298282# these configuration-based exclusions must match Install.pm
299283next if ($module eq " uuid-ossp" && !defined ($config -> {uuid }));
300284next if ($module eq " sslinfo" && !defined ($config -> {openssl }));
@@ -305,26 +289,31 @@ sub contribcheck
305289next if ($module eq " sepgsql" );
306290
307291subdircheck(" $topdir /contrib" ,$module );
292+ my $status =$? >> 8;
293+ $mstat ||=$status ;
308294}
295+ exit $mstat if $mstat ;
309296}
310297
311298sub modulescheck
312299{
313- InstallTemp() ;
314- chdir " $topdir /src/test/modules " ;
300+ chdir " ../../../src/test/modules " ;
301+ my $mstat = 0 ;
315302foreach my $module (glob (" *" ))
316303{
317304subdircheck(" $topdir /src/test/modules" ,$module );
305+ my $status =$? >> 8;
306+ $mstat ||=$status ;
318307}
308+ exit $mstat if $mstat ;
319309}
320310
321-
322311# Run "initdb", then reconfigure authentication.
323312sub standard_initdb
324313{
325314return (
326- system (" ${tmp_installdir} /bin/ initdb" ,' -N' ) == 0and system (
327- " ${tmp_installdir} /bin /pg_regress" ,' --config-auth' ,
315+ system (' initdb' ,' -N' ) == 0and system (
316+ " $topdir / $Config /pg_regress /pg_regress" ,' --config-auth' ,
328317$ENV {PGDATA }) == 0);
329318}
330319
@@ -343,13 +332,14 @@ sub upgradecheck
343332$ENV {PGPORT } ||= 50432;
344333my $tmp_root =" $topdir /src/bin/pg_upgrade/tmp_check" ;
345334(mkdir $tmp_root ||die $! )unless -d $tmp_root ;
346-
347- InstallTemp();
335+ my $upg_tmp_install =" $tmp_root /install" ;# unshared temp install
336+ print " Setting up temp install\n\n " ;
337+ Install($upg_tmp_install ," all" ,$config );
348338
349339# Install does a chdir, so change back after that
350340chdir $cwd ;
351341my ($bindir ,$libdir ,$oldsrc ,$newsrc ) =
352- (" $tmp_installdir /bin" ," $tmp_installdir /lib" ,$topdir ,$topdir );
342+ (" $upg_tmp_install /bin" ," $upg_tmp_install /lib" ,$topdir ,$topdir );
353343$ENV {PATH } =" $bindir ;$ENV {PATH}" ;
354344my $data =" $tmp_root /data" ;
355345$ENV {PGDATA } =" $data .old" ;
@@ -488,6 +478,7 @@ sub InstallTemp
488478{
489479print " Setting up temp install\n\n " ;
490480Install(" $tmp_installdir " ," all" ,$config );
481+ $ENV {PATH } =" $tmp_installdir /bin;$ENV {PATH}" ;
491482}
492483
493484sub usage