5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 #ident "@(#)pg_regress.sh 1.1 09/10/13 SMI"
27 # Wrapper to run pg_regress using the test suite installed
28 # with the PostgreSQL packages
30 PG_ROOT
=/usr
/postgres
/15
32 # Default values for arguments
34 REG_ROOT
=${PG_ROOT}/lib
/64/regress
36 PGREG_BIN
=${PG_ROOT}/lib
/64/pgxs
/src
/test
/regress
/pg_regress
37 PGREG_TMP
=/var
/tmp
/pg_regress_15
39 if [ '$1' = '--help' ] ; then
44 [--driver <pg_regress binary>]
47 <testsuite> is the path to the installed test suite.
52 <pg_regress> is the path to the pg_regress test driver binary.
55 These three options (if used) can be in any order.
57 Additional arguments are passed on to pg_regress. Typically, this
58 will be --schedule=<schedule file>.
60 The PostgreSQL server must already be running on the same host.
61 The environment variable PGPORT must be set if the server is not using
64 A copy of the testsuite as well as output, will be placed in the directory
65 /var/tmp/pg_regress_15 and subdirectories; any previous contents will be
66 removed before the test starts.
71 if echo $
* |
grep -- --top-builddir > /dev
/null
; then
72 echo "\"--top-builddir\" option is not available for this packaged test driver."
73 echo "Please start your PostgreSQL server separately."
79 while [ $parse = true
] ; do
99 # pg_regress really only works with write permission on input directory,
100 # so need to create a similar directory structure to satisfy it
102 if [ -d "$PGREG_TMP" ] ; then
103 /usr
/bin
/rm -rf "${PGREG_TMP}"
105 mkdir
-p "${PGREG_TMP}"
111 chmod o
+w sql expected
112 mkdir results testtablespace