summaryrefslogtreecommitdiff
path: root/test/bin
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2018-01-03 15:11:48 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2018-01-03 15:11:48 +0000
commit6481e12595de1b95cf9f75ddad2ae9e7c27fd150 (patch)
treebc3f06f42f1400e6599901bf8548cf6ec0084e7f /test/bin
parent743c4c9f5a8ecd10fb91fff283d949ca9d12e2fb (diff)
Testsuite: Better platform portability by searching for Postgres server binaries
Diffstat (limited to 'test/bin')
-rw-r--r--test/bin/.gitignore2
-rwxr-xr-xtest/bin/locate.sh24
2 files changed, 26 insertions, 0 deletions
diff --git a/test/bin/.gitignore b/test/bin/.gitignore
new file mode 100644
index 000000000..df0219e79
--- /dev/null
+++ b/test/bin/.gitignore
@@ -0,0 +1,2 @@
+*
+!locate.sh
diff --git a/test/bin/locate.sh b/test/bin/locate.sh
new file mode 100755
index 000000000..dad0bd49f
--- /dev/null
+++ b/test/bin/locate.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+[ -e bin.sys ] || mkdir bin.sys
+cd bin.sys
+
+while read d
+do
+ if [ -x $d/$1 ]
+ then
+ while [ $# -gt 0 ]
+ do
+ rm -f ./$1
+ ln -s $d/$1 .
+ shift
+ done
+ fi
+done <<-HERE
+ /bin
+ /usr/bin
+ /usr/local/bin
+ /usr/lib/postgresql/10/bin
+ /usr/lib/postgresql/9/bin
+HERE
+