From 473ac70acae41c5f1fecbb0b57e9f5be5b26ab68 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 3 Jun 2004 00:25:47 +0000 Subject: [PATCH] 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 --- src/test/regress/pg_regress.sh | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/src/test/regress/pg_regress.sh b/src/test/regress/pg_regress.sh index 35c9b527aa..52dd762389 100644 --- a/src/test/regress/pg_regress.sh +++ b/src/test/regress/pg_regress.sh @@ -1,5 +1,5 @@ #! /bin/sh -# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.44 2004/05/20 00:21:36 momjian Exp $ +# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.45 2004/06/03 00:25:47 momjian Exp $ me=`basename $0` : ${TMPDIR=/tmp} @@ -207,18 +207,6 @@ case $host_platform in esac -# ---------- -# Set up pwd to give a win32 happy pathname -# ---------- - -case $host_platform in - *-*-mingw32*) - PWDFLAGS=-W;; - *) - PWDFLAGS=;; -esac - - # ---------- # Set backend timezone and datestyle explicitly # @@ -306,12 +294,20 @@ LOGDIR=$outputdir/log if [ x"$temp_install" != x"" ] then if echo x"$temp_install" | grep -v '^x/' >/dev/null 2>&1; then - temp_install="`pwd $PWDFLAGS`/$temp_install" + case $host_platform in + *-*-mingw32*) + pkglibdir="`pwd -W`/$temp_install/install/$pkglibdir" + temp_install="`pwd`/$temp_install" + ;; + *) + temp_install="`pwd`/$temp_install" + pkglibdir=$temp_install/install/$pkglibdir + ;; + esac fi bindir=$temp_install/install/$bindir libdir=$temp_install/install/$libdir - pkglibdir=$temp_install/install/$pkglibdir datadir=$temp_install/install/$datadir PGDATA=$temp_install/data @@ -602,7 +598,8 @@ do # Run a single test formatted=`echo $1 | awk '{printf "%-20.20s", $1;}'` $ECHO_N "test $formatted ... $ECHO_C" - $PSQL -d "$dbname" <"$inputdir/sql/$1.sql" >"$outputdir/results/$1.out" 2>&1 + ( $PSQL -d "$dbname" <"$inputdir/sql/$1.sql" >"$outputdir/results/$1.out" 2>&1 )& + wait else # Start a parallel group $ECHO_N "parallel group ($# tests): $ECHO_C" @@ -704,7 +701,7 @@ done | tee "$result_summary_file" 2>&1 if [ -n "$postmaster_pid" ]; then message "shutting down postmaster" - kill -15 "$postmaster_pid" + "$bindir/pg_ctl" -s -D "$PGDATA" stop wait "$postmaster_pid" unset postmaster_pid fi