File: installcheck

package info (click to toggle)
postgresql-plproxy 2.8-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 672 kB
  • sloc: ansic: 3,712; sql: 1,083; lex: 338; yacc: 171; makefile: 117; sh: 26
file content (34 lines) | stat: -rwxr-xr-x 727 bytes parent folder | download
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
#!/bin/sh

# some tests insist on /var/run/postgresql/, so run as root

set -e

cleanup () {
	for f in test/sql/*.sql.orig; do
		test -f $f || continue
		mv $f ${f%.orig}
	done
}
trap "cleanup" EXIT HUP INT QUIT PIPE TERM

for v in $(pg_buildext supported-versions); do
	case $v in
		8*|9.0) make sql/plproxy.sql
			;;
		*)	# we want to test the installed extension, so don't source from the build tree
			sed -i.orig 's/\\i.*plproxy\.sql/CREATE EXTENSION plproxy;/' test/sql/*.sql
			;;
	esac
	case $v in
		8*|9.0|9.1|9.2)
			usd="unix_socket_directory" ;;
		*)
			usd="unix_socket_directories" ;;
	esac

	newnet pg_buildext -c '--port=5432' -c '--locale=C' -i '--auth=trust' \
		-o "$usd=/tmp" installcheck-$v

	cleanup
done