summaryrefslogtreecommitdiff
path: root/src/test/regress
diff options
context:
space:
mode:
authorPeter Eisentraut2000-10-22 22:15:13 +0000
committerPeter Eisentraut2000-10-22 22:15:13 +0000
commitfba790ad586727c54d0ed12f3c9679f9533d2c6f (patch)
treeda276b3f07b84f41cf4e8ecd3a589ee4ccb87763 /src/test/regress
parent3c5d000749131f32bd77bae30add25035c1fd070 (diff)
Makeover for Unixware 7.1.1
* Makefile: Add more standard targets. Improve shell redirection in GNU make detection. * src/backend/access/transam/rmgr.c: Fix incorrect(?) C. * src/backend/libpq/pqcomm.c (StreamConnection): Work around accept() bug. * src/include/port/unixware.h: ...with help from here. * src/backend/nodes/print.c (plannode_type): Remove some "break"s after "return"s. * src/backend/tcop/dest.c (DestToFunction): ditto. * src/backend/nodes/readfuncs.c: Add proper prototypes. * src/backend/utils/adt/numutils.c (pg_atoi): Cope specially with strtol() setting EINVAL. This saves us from creating an extra set of regression test output for the affected systems. * src/include/storage/s_lock.h (tas): Correct prototype. * src/interfaces/libpq/fe-connect.c (parseServiceInfo): Don't use variable as dimension in array definition. * src/makefiles/Makefile.unixware: Add support for GCC. * src/template/unixware: same here * src/test/regress/expected/abstime-solaris-1947.out: Adjust whitespace. * src/test/regress/expected/horology-solaris-1947.out: Part of this file was evidently missing. * src/test/regress/pg_regress.sh: Fix shell. mkdir -p returns non-zero if the directory exists. * src/test/regress/resultmap: Add entries for Unixware.
Diffstat (limited to 'src/test/regress')
-rw-r--r--src/test/regress/expected/abstime-solaris-1947.out1
-rw-r--r--src/test/regress/expected/horology-solaris-1947.out42
-rw-r--r--src/test/regress/pg_regress.sh18
-rw-r--r--src/test/regress/resultmap7
4 files changed, 60 insertions, 8 deletions
diff --git a/src/test/regress/expected/abstime-solaris-1947.out b/src/test/regress/expected/abstime-solaris-1947.out
index efe333967d1..f5b78a1b4f8 100644
--- a/src/test/regress/expected/abstime-solaris-1947.out
+++ b/src/test/regress/expected/abstime-solaris-1947.out
@@ -126,3 +126,4 @@ SELECT '' AS four, f1 AS abstime,
| Sun Jan 14 03:14:21 1973 PST | 1973 | 1 | 14 | 3 | 14 | 21
| Mon May 01 00:30:30 1995 PDT | 1995 | 5 | 1 | 0 | 30 | 30
(4 rows)
+
diff --git a/src/test/regress/expected/horology-solaris-1947.out b/src/test/regress/expected/horology-solaris-1947.out
index 0097d383ba1..44aa90d9e14 100644
--- a/src/test/regress/expected/horology-solaris-1947.out
+++ b/src/test/regress/expected/horology-solaris-1947.out
@@ -2,6 +2,48 @@
-- HOROLOGY
--
--
+-- date, time arithmetic
+--
+SELECT date '1981-02-03' + time '04:05:06' AS "Date + Time";
+ Date + Time
+------------------------------
+ Tue Feb 03 04:05:06 1981 PST
+(1 row)
+
+SELECT date '1991-02-03' + time with time zone '04:05:06 PST' AS "Date + Time PST";
+ Date + Time PST
+------------------------------
+ Sun Feb 03 04:05:06 1991 PST
+(1 row)
+
+SELECT date '2001-02-03' + time with time zone '04:05:06 UTC' AS "Date + Time UTC";
+ Date + Time UTC
+------------------------------
+ Fri Feb 02 20:05:06 2001 PST
+(1 row)
+
+SELECT date '1991-02-03' + interval '2 years' AS "Add Two Years";
+ Add Two Years
+------------------------------
+ Wed Feb 03 00:00:00 1993 PST
+(1 row)
+
+SELECT date '2001-12-13' - interval '2 years' AS "Subtract Two Years";
+ Subtract Two Years
+------------------------------
+ Mon Dec 13 00:00:00 1999 PST
+(1 row)
+
+SELECT date '1991-02-03' - time '04:05:06' AS "Subtract Time";
+ Subtract Time
+------------------------------
+ Sat Feb 02 19:54:54 1991 PST
+(1 row)
+
+SELECT date '1991-02-03' - time with time zone '04:05:06 UTC' AS "Subtract Time UTC";
+ERROR: Unable to identify an operator '-' for types 'date' and 'timetz'
+ You will have to retype this query using an explicit cast
+--
-- timestamp, interval arithmetic
--
SELECT timestamp '1996-03-01' - interval '1 second' AS "Feb 29";
diff --git a/src/test/regress/pg_regress.sh b/src/test/regress/pg_regress.sh
index 34584a6e4f0..01cc436afe8 100644
--- a/src/test/regress/pg_regress.sh
+++ b/src/test/regress/pg_regress.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.7 2000/10/07 20:23:03 petere Exp $
+# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.8 2000/10/22 22:15:09 petere Exp $
me=`basename $0`
: ${TMPDIR=/tmp}
@@ -85,7 +85,7 @@ export PGHOST
export PGPORT
dbname=regression
-hostname=`hostname` || hostname=localhost
+hostname=localhost
: ${GMAKE='@GMAKE@'}
@@ -287,7 +287,9 @@ then
fi
message "creating temporary installation"
- mkdir -p "$LOGDIR" || { (exit 2); exit; }
+ if [ ! -d "$LOGDIR" ]; then
+ mkdir -p "$LOGDIR" || { (exit 2); exit; }
+ fi
$GMAKE -C "$top_builddir" DESTDIR="$temp_install" install >"$LOGDIR/install.log" 2>&1
if [ $? -ne 0 ]
@@ -423,7 +425,9 @@ esac
message "running regression test queries"
-mkdir -p "$outputdir/results" || { (exit 2); exit; }
+if [ ! -d "$outputdir/results" ]; then
+ mkdir -p "$outputdir/results" || { (exit 2); exit; }
+fi
result_summary_file=$outputdir/regression.out
diff_file=$outputdir/regression.diffs
@@ -469,9 +473,9 @@ do
else
# Start a parallel group
$ECHO_N "parallel group ($# tests): " $ECHO_C
- for name; do
+ for name do
( $PSQL -d $dbname <"$inputdir/sql/$name.sql" >"$outputdir/results/$name.out" 2>&1
- $ECHO_N " $name $ECHO_C"
+ $ECHO_N " $name$ECHO_C"
) &
done
wait
@@ -485,7 +489,7 @@ do
# subshells.)
# ----------
- for name; do
+ for name do
if [ $# -ne 1 ]; then
formatted=`echo "$name" | awk '{printf "%-20.20s", $1;}'`
$ECHO_N " $formatted ... $ECHO_C"
diff --git a/src/test/regress/resultmap b/src/test/regress/resultmap
index 98b064ac3ea..2c80aec16c8 100644
--- a/src/test/regress/resultmap
+++ b/src/test/regress/resultmap
@@ -3,6 +3,7 @@ abstime/.*-irix6=abstime-1947-PDT
abstime/alpha.*-dec-osf=abstime-solaris-1947
abstime/i.86-pc-solaris=abstime-solaris-1947
abstime/sparc-sun-solaris=abstime-solaris-1947
+abstime/.*-sysv5uw=abstime-solaris-1947
float4/.*-qnx=float4-exp-three-digits
float8/.*-bsdi=float8-small-is-zero
float8/.*-freebsd*=float8-small-is-zero
@@ -27,10 +28,11 @@ geometry/.*beos=geometry-intel-beos
horology/.*aix4=horology-1947-PDT
horology/.*-irix6=horology-1947-PDT
horology/alpha.*-dec-osf=horology-solaris-1947
-horology/*-*-cygwin*=horology-no-DST-before-1970
+horology/.*-cygwin=horology-no-DST-before-1970
horology/hppa=horology-no-DST-before-1970
horology/i.86-pc-solaris=horology-solaris-1947
horology/sparc-sun-solaris=horology-solaris-1947
+horology/.*-sysv5uw=horology-solaris-1947
int2/.*-aix4=int2-too-large
int2/.*-bsdi=int2-too-large
int2/.*-freebsd=int2-too-large
@@ -44,6 +46,7 @@ int2/i.86-pc-linux-gnulibc=int2-not-representable
int2/i.86-pc-solaris=int2-too-large
int2/powerpc-unknown-linux-gnulibc1=int2-not-representable
int2/sparc-sun-solaris=int2-too-large
+int2/.*-sysv5uw=int2-too-large
int2/.*beos=int2-range-error
int4/.*-aix4=int4-too-large
int4/.*-bsdi=int4-too-large
@@ -58,6 +61,7 @@ int4/i.86-pc-linux-gnulibc=int4-not-representable
int4/i.86-pc-solaris=int4-too-large
int4/powerpc-unknown-linux-gnulibc1=int4-not-representable
int4/sparc-sun-solaris=int4-too-large
+int4/.*-sysv5uw=int4-too-large
int4/.*beos=int4-range-error
int8/.*-qnx=int8-exp-three-digits
tinterval/.*aix4=tinterval-1947-PDT
@@ -65,3 +69,4 @@ tinterval/.*-irix6=tinterval-1947-PDT
tinterval/alpha.*-dec-osf=tinterval-solaris-1947
tinterval/i.86-pc-solaris=tinterval-solaris-1947
tinterval/sparc-sun-solaris=tinterval-solaris-1947
+tinterval/.*-sysv5uw=tinterval-solaris-1947