@@ -108,15 +108,12 @@ sub installcheck
108
108
109
109
sub check
110
110
{
111
- chdir $startdir ;
112
-
113
111
InstallTemp();
114
112
chdir " ${topdir} /src/test/regress" ;
115
-
116
113
my @args = (
117
- " ${tmp_installdir} /bin /pg_regress" ,
114
+ " ../../../ $Config /pg_regress /pg_regress" ,
118
115
" --dlpath=." ,
119
- " --bindir=${tmp_installdir} /bin " ,
116
+ " --bindir=" ,
120
117
" --schedule=${schedule} _schedule" ,
121
118
" --encoding=SQL_ASCII" ,
122
119
" --no-locale" ,
@@ -136,11 +133,9 @@ sub ecpgcheck
136
133
exit $status if $status ;
137
134
InstallTemp();
138
135
chdir " $topdir /src/interfaces/ecpg/test" ;
139
-
140
- $ENV {PATH } =" ${tmp_installdir} /bin;${tmp_installdir} /lib;$ENV {PATH}" ;
141
136
$schedule =" ecpg" ;
142
137
my @args = (
143
- " ${tmp_installdir} /bin /pg_regress_ecpg" ,
138
+ " ../../../../ $Config /pg_regress_ecpg /pg_regress_ecpg" ,
144
139
" --bindir=" ,
145
140
" --dbname=regress1,connectdb" ,
146
141
" --create-role=connectuser,connectdb" ,
@@ -156,14 +151,12 @@ sub ecpgcheck
156
151
157
152
sub isolationcheck
158
153
{
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" );
164
157
my @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 " ,
167
160
" --inputdir=." ,
168
161
" --schedule=./isolation_schedule" );
169
162
push (@args ,$maxconn )if $maxconn ;
@@ -174,10 +167,7 @@ sub isolationcheck
174
167
175
168
sub plcheck
176
169
{
177
- chdir $startdir ;
178
-
179
- InstallTemp();
180
- chdir " ${topdir} /src/pl" ;
170
+ chdir " ../../pl" ;
181
171
182
172
foreach my $pl (glob (" *" ))
183
173
{
@@ -214,8 +204,8 @@ sub plcheck
214
204
" ============================================================\n " ;
215
205
print " Checking$lang \n " ;
216
206
my @args = (
217
- " ${tmp_installdir} /bin /pg_regress" ,
218
- " --bindir=${tmp_installdir} /bin " ,
207
+ " ../../../ $Config /pg_regress /pg_regress" ,
208
+ " --bindir=../../../ $Config /psql " ,
219
209
" --dbname=pl_regression" ,@lang_args ,@tests );
220
210
system (@args );
221
211
my $status =$? >> 8;
@@ -230,7 +220,6 @@ sub subdircheck
230
220
{
231
221
my $subdir =shift ;
232
222
my $module =shift ;
233
- my $mstat = 0;
234
223
235
224
if ( !-d " $module /sql"
236
225
|| !-d " $module /expected"
@@ -277,24 +266,19 @@ sub subdircheck
277
266
print " ============================================================\n " ;
278
267
print " Checking$module \n " ;
279
268
my @args = (
280
- " ${tmp_installdir} /bin /pg_regress" ,
281
- " --bindir=${tmp_installdir} /bin " ,
269
+ " $topdir / $Config /pg_regress /pg_regress" ,
270
+ " --bindir=${topdir} / ${Config} /psql " ,
282
271
" --dbname=contrib_regression" ,@opts ,@tests );
283
272
system (@args );
284
- my $status =$? >> 8;
285
- $mstat ||=$status ;
286
273
chdir " .." ;
287
-
288
- exit $mstat if $mstat ;
289
274
}
290
275
291
276
sub contribcheck
292
277
{
293
- InstallTemp() ;
294
- chdir " $topdir /contrib " ;
278
+ chdir " ../../../contrib " ;
279
+ my $mstat = 0 ;
295
280
foreach my $module (glob (" *" ))
296
281
{
297
-
298
282
# these configuration-based exclusions must match Install.pm
299
283
next if ($module eq " uuid-ossp" && !defined ($config -> {uuid }));
300
284
next if ($module eq " sslinfo" && !defined ($config -> {openssl }));
@@ -305,26 +289,31 @@ sub contribcheck
305
289
next if ($module eq " sepgsql" );
306
290
307
291
subdircheck(" $topdir /contrib" ,$module );
292
+ my $status =$? >> 8;
293
+ $mstat ||=$status ;
308
294
}
295
+ exit $mstat if $mstat ;
309
296
}
310
297
311
298
sub modulescheck
312
299
{
313
- InstallTemp() ;
314
- chdir " $topdir /src/test/modules " ;
300
+ chdir " ../../../src/test/modules " ;
301
+ my $mstat = 0 ;
315
302
foreach my $module (glob (" *" ))
316
303
{
317
304
subdircheck(" $topdir /src/test/modules" ,$module );
305
+ my $status =$? >> 8;
306
+ $mstat ||=$status ;
318
307
}
308
+ exit $mstat if $mstat ;
319
309
}
320
310
321
-
322
311
# Run "initdb", then reconfigure authentication.
323
312
sub standard_initdb
324
313
{
325
314
return (
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' ,
328
317
$ENV {PGDATA }) == 0);
329
318
}
330
319
@@ -343,13 +332,14 @@ sub upgradecheck
343
332
$ENV {PGPORT } ||= 50432;
344
333
my $tmp_root =" $topdir /src/bin/pg_upgrade/tmp_check" ;
345
334
(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 );
348
338
349
339
# Install does a chdir, so change back after that
350
340
chdir $cwd ;
351
341
my ($bindir ,$libdir ,$oldsrc ,$newsrc ) =
352
- (" $tmp_installdir /bin" ," $tmp_installdir /lib" ,$topdir ,$topdir );
342
+ (" $upg_tmp_install /bin" ," $upg_tmp_install /lib" ,$topdir ,$topdir );
353
343
$ENV {PATH } =" $bindir ;$ENV {PATH}" ;
354
344
my $data =" $tmp_root /data" ;
355
345
$ENV {PGDATA } =" $data .old" ;
@@ -488,6 +478,7 @@ sub InstallTemp
488
478
{
489
479
print " Setting up temp install\n\n " ;
490
480
Install(" $tmp_installdir " ," all" ,$config );
481
+ $ENV {PATH } =" $tmp_installdir /bin;$ENV {PATH}" ;
491
482
}
492
483
493
484
sub usage