Skip to content

Commit 473ac70

Browse files
committed
Win32 regression fixes:
. only use the -W flag on pwd for $pkglibdir. All the other paths need to be seen as MSys type paths, whereas $pkglibdir needs to be expressed as a genuine windows path. . run single tests in the background and explicitly wait for them - solves the problem of the MSys shell not waiting properly for the copy test to finish. . use pg_ctl to shut down the test postmaster - no more use of ad hoc kill programs or the task manager. Andrew Dunstan
1 parent 3c45d34 commit 473ac70

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

src/test/regress/pg_regress.sh

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.44 2004/05/20 00:21:36 momjian Exp $
2+
# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.45 2004/06/03 00:25:47 momjian Exp $
33

44
me=`basename $0`
55
: ${TMPDIR=/tmp}
@@ -207,18 +207,6 @@ case $host_platform in
207207
esac
208208

209209

210-
# ----------
211-
# Set up pwd to give a win32 happy pathname
212-
# ----------
213-
214-
case $host_platform in
215-
*-*-mingw32*)
216-
PWDFLAGS=-W;;
217-
*)
218-
PWDFLAGS=;;
219-
esac
220-
221-
222210
# ----------
223211
# Set backend timezone and datestyle explicitly
224212
#
@@ -306,12 +294,20 @@ LOGDIR=$outputdir/log
306294
if [ x"$temp_install" != x"" ]
307295
then
308296
if echo x"$temp_install" | grep -v '^x/' >/dev/null 2>&1; then
309-
temp_install="`pwd $PWDFLAGS`/$temp_install"
297+
case $host_platform in
298+
*-*-mingw32*)
299+
pkglibdir="`pwd -W`/$temp_install/install/$pkglibdir"
300+
temp_install="`pwd`/$temp_install"
301+
;;
302+
*)
303+
temp_install="`pwd`/$temp_install"
304+
pkglibdir=$temp_install/install/$pkglibdir
305+
;;
306+
esac
310307
fi
311308

312309
bindir=$temp_install/install/$bindir
313310
libdir=$temp_install/install/$libdir
314-
pkglibdir=$temp_install/install/$pkglibdir
315311
datadir=$temp_install/install/$datadir
316312
PGDATA=$temp_install/data
317313

@@ -602,7 +598,8 @@ do
602598
# Run a single test
603599
formatted=`echo $1 | awk '{printf "%-20.20s", $1;}'`
604600
$ECHO_N "test $formatted ... $ECHO_C"
605-
$PSQL -d "$dbname" <"$inputdir/sql/$1.sql" >"$outputdir/results/$1.out" 2>&1
601+
( $PSQL -d "$dbname" <"$inputdir/sql/$1.sql" >"$outputdir/results/$1.out" 2>&1 )&
602+
wait
606603
else
607604
# Start a parallel group
608605
$ECHO_N "parallel group ($# tests): $ECHO_C"
@@ -704,7 +701,7 @@ done | tee "$result_summary_file" 2>&1
704701

705702
if [ -n "$postmaster_pid" ]; then
706703
message "shutting down postmaster"
707-
kill -15 "$postmaster_pid"
704+
"$bindir/pg_ctl" -s -D "$PGDATA" stop
708705
wait "$postmaster_pid"
709706
unset postmaster_pid
710707
fi

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