summaryrefslogtreecommitdiff
blob: ce2258e74f4eea2959a39a9ca5a8a52125721832 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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 2>/dev/null
+    until "$clientbindir/psql" $psql_options template1 </dev/null 2>/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