Commit 7a6a7d57 authored by Tom Lane's avatar Tom Lane

pg_regress now needs to know that Windows hasn't got unix sockets,

per Andrew Dunstan.  Also, don't override the user's value of PGHOST
in the 'make installcheck' case.  I think the latter was an ill-considered
workaround for the Windows code back when libpq didn't properly default
to localhost on Unix-socket-less platforms.
parent 893c66de
#! /bin/sh #! /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` me=`basename $0`
: ${TMPDIR=/tmp} : ${TMPDIR=/tmp}
...@@ -192,11 +192,10 @@ esac ...@@ -192,11 +192,10 @@ esac
# ---------- # ----------
# When on QNX or BeOS, don't use Unix sockets. # On some platforms we can't use Unix sockets.
# ---------- # ----------
case $host_platform in case $host_platform in
*-*-qnx* | *beos*) *-*-cygwin* | *-*-mingw32* | *-*-qnx* | *beos*)
unix_sockets=no;; unix_sockets=no;;
*) *)
unix_sockets=yes;; unix_sockets=yes;;
...@@ -309,7 +308,7 @@ then ...@@ -309,7 +308,7 @@ then
case $host_platform in case $host_platform in
*-*-mingw32*) *-*-mingw32*)
pkglibdir="`pwd -W`/$temp_install/install/$pkglibdir" pkglibdir="`pwd -W`/$temp_install/install/$pkglibdir"
temp_install="`pwd`/$temp_install" temp_install="`pwd`/$temp_install"
;; ;;
*) *)
temp_install="`pwd`/$temp_install" temp_install="`pwd`/$temp_install"
...@@ -418,9 +417,9 @@ then ...@@ -418,9 +417,9 @@ then
message "starting postmaster" message "starting postmaster"
[ "$debug" = yes ] && postmaster_options="$postmaster_options -d 5" [ "$debug" = yes ] && postmaster_options="$postmaster_options -d 5"
if [ "$unix_sockets" = no ]; then if [ "$unix_sockets" = no ]; then
postmaster_options="$postmaster_options -c listen_addresses=$hostname" postmaster_options="$postmaster_options -c listen_addresses=$hostname"
else else
postmaster_options="$postmaster_options -c listen_addresses=''" postmaster_options="$postmaster_options -c listen_addresses=''"
fi fi
"$bindir/postmaster" -D "$PGDATA" -F $postmaster_options >"$LOGDIR/postmaster.log" 2>&1 & "$bindir/postmaster" -D "$PGDATA" -F $postmaster_options >"$LOGDIR/postmaster.log" 2>&1 &
postmaster_pid=$! postmaster_pid=$!
...@@ -470,13 +469,6 @@ else # not temp-install ...@@ -470,13 +469,6 @@ else # not temp-install
;; ;;
esac 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 if [ -n "$PGPORT" ]; then
port_info="port $PGPORT" port_info="port $PGPORT"
else else
...@@ -486,15 +478,13 @@ else # not temp-install ...@@ -486,15 +478,13 @@ else # not temp-install
if [ -n "$PGHOST" ]; then if [ -n "$PGHOST" ]; then
echo "(using postmaster on $PGHOST, $port_info)" echo "(using postmaster on $PGHOST, $port_info)"
else else
case $host_platform in if [ "$unix_sockets" = no ]; then
*-*-mingw32*) echo "(using postmaster on localhost, $port_info)"
echo "(using postmaster on localhost socket, $port_info)" else
;; echo "(using postmaster on Unix socket, $port_info)"
*) fi
echo "(using postmaster on Unix socket, $port_info)"
;;
esac
fi fi
message "dropping database \"$dbname\"" message "dropping database \"$dbname\""
"$bindir/dropdb" $psql_options "$dbname" "$bindir/dropdb" $psql_options "$dbname"
# errors can be ignored # errors can be ignored
...@@ -634,7 +624,7 @@ do ...@@ -634,7 +624,7 @@ do
formatted=`echo $1 | awk '{printf "%-20.20s", $1;}'` formatted=`echo $1 | awk '{printf "%-20.20s", $1;}'`
$ECHO_N "test $formatted ... $ECHO_C" $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 wait
else else
# Start a parallel group # Start a parallel group
$ECHO_N "parallel group ($# tests): $ECHO_C" $ECHO_N "parallel group ($# tests): $ECHO_C"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment