diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile index ebf14e5..bb07726 100644 --- a/src/test/regress/GNUmakefile +++ b/src/test/regress/GNUmakefile @@ -113,7 +113,7 @@ all-spi: ## check: all - $(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) + clientbindir="/usr/lib/postgresql-${SLOT}/bin" $(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) installcheck: all $(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) diff --git a/src/test/regress/pg_regress.sh b/src/test/regress/pg_regress.sh index 9657ed3..b1b1a7f 100644 --- a/src/test/regress/pg_regress.sh +++ b/src/test/regress/pg_regress.sh @@ -77,6 +77,8 @@ host_platform='@host_tuple@' enable_shared='@enable_shared@' GCC=@GCC@ +test -z "${clientbindir}" && clientbindir="${bindir}" + if [ "$GCC" = yes ]; then compiler=gcc else @@ -364,7 +366,7 @@ then # wait forever, however. i=0 max=60 - until "$bindir/psql" $psql_options template1 /dev/null + until "$clientbindir/psql" $psql_options template1 /dev/null do i=`expr $i + 1` if [ $i -ge $max ] @@ -411,7 +413,7 @@ else # not temp-install echo "(using postmaster on Unix socket, $port_info)" fi message "dropping database \"$dbname\"" - "$bindir/dropdb" $psql_options "$dbname" + "$clientbindir/dropdb" $psql_options "$dbname" # errors can be ignored fi @@ -420,7 +422,7 @@ fi # Set up SQL shell for the test. # ---------- -PSQL="$bindir/psql -q -X $psql_options" +PSQL="$clientbindir/psql -q -X $psql_options" # ---------- @@ -451,13 +453,13 @@ fi # ---------- message "creating database \"$dbname\"" -"$bindir/createdb" $encoding_opt $psql_options --template template0 "$dbname" +"$clientbindir/createdb" $encoding_opt $psql_options --template template0 "$dbname" if [ $? -ne 0 ]; then echo "$me: createdb failed" (exit 2); exit fi -"$bindir/psql" $psql_options -c "\ +"$clientbindir/psql" $psql_options -c "\ alter database \"$dbname\" set lc_messages to 'C'; alter database \"$dbname\" set lc_monetary to 'C'; alter database \"$dbname\" set lc_numeric to 'C'; @@ -473,7 +475,7 @@ fi # ---------- message "dropping regression test user accounts" -"$bindir/psql" $psql_options -c 'SET autocommit TO on;DROP GROUP regressgroup1; DROP GROUP regressgroup2; DROP USER regressuser1, regressuser2, regressuser3, regressuser4;' $dbname 2>/dev/null +"$clientbindir/psql" $psql_options -c 'SET autocommit TO on;DROP GROUP regressgroup1; DROP GROUP regressgroup2; DROP USER regressuser1, regressuser2, regressuser3, regressuser4;' $dbname 2>/dev/null if [ $? -eq 2 ]; then echo "$me: could not drop user accounts" (exit 2); exit @@ -486,7 +488,7 @@ fi if [ "$enable_shared" = yes ]; then message "installing PL/pgSQL" - "$bindir/createlang" -L "$pkglibdir" $psql_options plpgsql $dbname + "$clientbindir/createlang" -L "$pkglibdir" $psql_options plpgsql $dbname if [ $? -ne 0 ] && [ $? -ne 2 ]; then echo "$me: createlang failed" (exit 2); exit