#! /bin/sh
-# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.52 2005/01/12 16:19:51 tgl Exp $
+# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.53 2005/01/15 04:15:51 tgl Exp $
me=`basename $0`
: ${TMPDIR=/tmp}
# ----------
-# When on QNX or BeOS, don't use Unix sockets.
+# On some platforms we can't use Unix sockets.
# ----------
-
case $host_platform in
- *-*-qnx* | *beos*)
+ *-*-cygwin* | *-*-mingw32* | *-*-qnx* | *beos*)
unix_sockets=no;;
*)
unix_sockets=yes;;
case $host_platform in
*-*-mingw32*)
pkglibdir="`pwd -W`/$temp_install/install/$pkglibdir"
- temp_install="`pwd`/$temp_install"
+ temp_install="`pwd`/$temp_install"
;;
*)
temp_install="`pwd`/$temp_install"
message "starting postmaster"
[ "$debug" = yes ] && postmaster_options="$postmaster_options -d 5"
if [ "$unix_sockets" = no ]; then
- postmaster_options="$postmaster_options -c listen_addresses=$hostname"
+ postmaster_options="$postmaster_options -c listen_addresses=$hostname"
else
- postmaster_options="$postmaster_options -c listen_addresses=''"
+ postmaster_options="$postmaster_options -c listen_addresses=''"
fi
"$bindir/postmaster" -D "$PGDATA" -F $postmaster_options >"$LOGDIR/postmaster.log" 2>&1 &
postmaster_pid=$!
;;
esac
- # If Unix sockets are not available, use the local host by default.
- if [ "$unix_sockets" = no ]; then
- PGHOST=$hostname
- export PGHOST
- unset PGHOSTADDR
- fi
-
if [ -n "$PGPORT" ]; then
port_info="port $PGPORT"
else
if [ -n "$PGHOST" ]; then
echo "(using postmaster on $PGHOST, $port_info)"
else
- case $host_platform in
- *-*-mingw32*)
- echo "(using postmaster on localhost socket, $port_info)"
- ;;
- *)
- echo "(using postmaster on Unix socket, $port_info)"
- ;;
- esac
+ if [ "$unix_sockets" = no ]; then
+ echo "(using postmaster on localhost, $port_info)"
+ else
+ echo "(using postmaster on Unix socket, $port_info)"
+ fi
fi
+
message "dropping database \"$dbname\""
"$bindir/dropdb" $psql_options "$dbname"
# errors can be ignored
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 )&
- wait
+ wait
else
# Start a parallel group
$ECHO_N "parallel group ($# tests): $ECHO_C"