Commit 6f64c2e5 authored by Peter Eisentraut's avatar Peter Eisentraut

New unified regression test driver, test/regress makefile cleanup,

add "check" and "installcheck" targets, straighten out make variable naming
of host_os, host_cpu, etc.
parent 2a7da3f5
#
# PostgreSQL top level makefile
#
# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.12 2000/09/21 20:17:41 petere Exp $
# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.13 2000/09/29 17:17:31 petere Exp $
#
subdir =
......@@ -29,6 +29,8 @@ distclean maintainer-clean:
-$(MAKE) -C src $@
-rm -f config.cache config.log config.status GNUmakefile
check installcheck: all
$(MAKE) -C src/test $@
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -33,6 +33,9 @@ AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(PG_VERSION, "$VERSION")
AC_CANONICAL_HOST
AC_SUBST(host)
AC_SUBST(host_cpu)
AC_SUBST(host_os)
template=
AC_MSG_CHECKING([which template to use])
......@@ -100,9 +103,7 @@ line.
AC_MSG_RESULT([$template])
PORTNAME=$template
CPU=$host_cpu
AC_SUBST(PORTNAME)
AC_SUBST(CPU)
AC_LINK_FILES([src/backend/port/dynloader/${template}.c], [src/backend/port/dynloader.c])
AC_LINK_FILES([src/backend/port/dynloader/${template}.h], [src/include/dynloader.h])
......
......@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.59 2000/07/23 13:01:08 petere Exp $
# $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.60 2000/09/29 17:17:32 petere Exp $
#
#-------------------------------------------------------------------------
......@@ -27,7 +27,7 @@ clean:
$(MAKE) -C bin $@
$(MAKE) -C pl $@
$(MAKE) -C utils $@
$(MAKE) -C test clean
$(MAKE) -C test $@
distclean maintainer-clean:
-$(MAKE) -C utils $@
......@@ -36,5 +36,5 @@ distclean maintainer-clean:
-$(MAKE) -C interfaces $@
-$(MAKE) -C bin $@
-$(MAKE) -C pl $@
-$(MAKE) -C test clean
-$(MAKE) -C test $@
rm -f Makefile.port Makefile.global GNUmakefile
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.96 2000/09/27 15:17:54 petere Exp $
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.97 2000/09/29 17:17:32 petere Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
......@@ -162,7 +162,10 @@ endif
# Name of the target platform.
PORTNAME= @PORTNAME@
CPU= @CPU@
host_tuple = @host@
host_os = @host_os@
host_cpu = @host_cpu@
# Various grungy items needed to configure some platforms.
HAVE_POSIX_SIGNALS= @HAVE_POSIX_SIGNALS@
......@@ -239,7 +242,7 @@ STRERROR2 = @STRERROR2@
SNPRINTF = @SNPRINTF@
STRDUP = @STRDUP@
.PHONY: all install installdirs uninstall dep depend clean distclean maintainer-clean distprep
.PHONY: all install installdirs uninstall dep depend clean distclean maintainer-clean distprep check installcheck
.SILENT: installdirs
# make `all' the default target
......
#
# Makefile for storage/ipc
#
# $Header: /cvsroot/pgsql/src/backend/storage/ipc/Makefile,v 1.13 2000/08/31 16:10:33 petere Exp $
# $Header: /cvsroot/pgsql/src/backend/storage/ipc/Makefile,v 1.14 2000/09/29 17:17:33 petere Exp $
#
subdir = src/backend/storage/ipc
......@@ -9,8 +9,8 @@ top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
# seems to be required 1999/07/22 bjm
ifeq ($(CPU), alpha)
ifeq ($(GCC), yes)
ifeq "$(findstring alpha,$(host_cpu))" "alpha"
ifeq "$(GCC)" "yes"
CFLAGS+= -fno-inline
endif
endif
......
#
# Makefile for utils/adt
#
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.46 2000/09/05 20:25:12 wieck Exp $
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.47 2000/09/29 17:17:33 petere Exp $
#
subdir = src/backend/utils/adt
......@@ -9,8 +9,8 @@ top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
# seems to be required for some date/time stuff 1999/07/22 bjm
ifeq ($(CPU),alpha)
ifeq ($(GCC), yes)
ifeq "$(findstring alpha,$(host_cpu))" "alpha"
ifeq "$(GCC)" "yes"
CFLAGS+= -mieee
endif
endif
......
......@@ -8,7 +8,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.15 2000/09/08 18:29:28 petere Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.16 2000/09/29 17:17:34 petere Exp $
#
#-------------------------------------------------------------------------
......@@ -237,7 +237,8 @@ if [ $? -ne 0 ]; then
fi
if [ "$res" ]; then
echo "$CMDNAME: '$langname' is already installed in database $dbname"
exit 1
# separate exit status for "already installed"
exit 2
fi
# ----------
......
......@@ -5,5 +5,4 @@ DLSUFFIX=.so
case $host_cpu in
mips*) CFLAGS="$CFLAGS -mips2";;
alpha*) CPU=alpha;;
esac
......@@ -7,10 +7,9 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/test/Makefile,v 1.2 1996/11/12 11:42:41 bryanh Exp $
# $Header: /cvsroot/pgsql/src/test/Makefile,v 1.3 2000/09/29 17:17:36 petere Exp $
#
#-------------------------------------------------------------------------
.DEFAULT all:
$(MAKE) -C bench $@
.DEFAULT:
$(MAKE) -C regress $@
......@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.23 2000/08/31 16:12:26 petere Exp $
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.24 2000/09/29 17:17:37 petere Exp $
#
#-------------------------------------------------------------------------
......@@ -15,67 +15,94 @@ subdir = src/test/regress
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
CONTRIB= $(top_builddir)/contrib
HOST := $(shell $(top_srcdir)/config/config.guess)
contribdir := $(top_builddir)/contrib
CFLAGS+= -I$(libpq_srcdir) $(CFLAGS_SL)
LDADD+= $(libpq)
#
# DLOBJS is the dynamically-loaded object file. The regression test uses
# this when it does a CREATE FUNCTION ... LANGUAGE 'C').
#
DLOBJS= regress$(DLSUFFIX)
#
# ... plus test query inputs
#
# INFILES is the files the regression test uses for input.
INFILES= $(DLOBJS)
#
# plus exports files
#
##
## Prepare for tests
##
# Build regression test driver
all: pg_regress
pg_regress: pg_regress.sh GNUmakefile
sed -e 's,@bindir@,$(bindir),g' \
-e 's,@libdir@,$(libdir),g' \
-e 's,@datadir@,$(datadir),g' \
-e 's/@VERSION@/$(VERSION)/g' \
-e 's/@host_tuple@/$(host_tuple)/g' \
$< >$@
chmod a+x $@
# Build dynamically-loaded object file for CREATE FUNCTION ... LANGUAGE 'C'.
DLOBJS := regress$(DLSUFFIX)
# This is for some platforms
ifdef EXPSUFF
INFILES+= $(DLOBJS:.o=$(EXPSUFF))
DLOBJS += regress$(EXPSUFF)
endif
all: $(DLOBJS)
# Build test input and expected files
file_list := copy create_function_1 create_function_2 misc constraints
input_files := $(foreach file, $(file_list), sql/$(file).sql)
output_files := $(foreach file, $(file_list), expected/$(file).out)
all: $(input_files) $(output_files)
sql/%.sql: input/%.source
pwd=`pwd` && sed "s,_OBJWD_,$$pwd,g;s/_DLSUFFIX_/$(DLSUFFIX)/g" $(srcdir)/$< >$@
expected/%.out: output/%.source
pwd=`pwd` && sed "s,_OBJWD_,$$pwd,g;s/_DLSUFFIX_/$(DLSUFFIX)/g" $(srcdir)/$< >$@
# And finally some extra C modules...
all: all-spi
.PHONY: all-spi
all-spi:
$(MAKE) -C $(contribdir)/spi REFINT_VERBOSE=1 refint$(DLSUFFIX) autoinc$(DLSUFFIX)
##
## Run tests
##
check: all
./pg_regress --temp-install --top-builddir=$(top_builddir) --schedule=parallel_schedule --multibyte=$(MULTIBYTE)
installcheck: all
./pg_regress --schedule=serial_schedule --multibyte=$(MULTIBYTE)
# old interfaces follow...
#
# huge extra tests run in target bigtest
#
EXTRA_TESTS = numeric_big
#
# prepare to run the tests
#
all: $(INFILES)
cd input; $(MAKE) all; cd ..
cd output; $(MAKE) all; cd ..
#ifneq ($(PORTNAME), win)
$(MAKE) -C $(CONTRIB)/spi REFINT_VERBOSE=1 \
refint$(DLSUFFIX) autoinc$(DLSUFFIX)
#else
# cat /dev/null > $(CONTRIB)/spi/refint$(DLSUFFIX)
# cat /dev/null > $(CONTRIB)/spi/autoinc$(DLSUFFIX)
#endif
#ifeq ($(PORTNAME), win)
#regress.dll: regress.c
# cat /dev/null > $@
#endif
#
# run the tests
#
runtest: $(INFILES)
runtest: all
ifneq ($(PORTNAME), win)
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
$(SHELL) ./regress.sh $(HOST) 2>&1 | tee regress.out
$(SHELL) ./regress.sh $(host_tuple) 2>&1 | tee regress.out
else
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
./regress.sh $(HOST) 2>&1 | tee regress.out
./regress.sh $(host_tuple) 2>&1 | tee regress.out
endif
@echo "ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILE regress.out"
@echo ""
......@@ -86,26 +113,26 @@ endif
#
# run the test including the huge extra tests
#
bigtest: $(INFILES)
bigtest: all
ifneq ($(PORTNAME), win)
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
$(SHELL) ./regress.sh $(HOST) $(EXTRA_TESTS) 2>&1 | tee regress.out
$(SHELL) ./regress.sh $(host_tuple) $(EXTRA_TESTS) 2>&1 | tee regress.out
else
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
./regress.sh $(HOST) $(EXTRA_TESTS) 2>&1 | tee regress.out
./regress.sh $(host_tuple) $(EXTRA_TESTS) 2>&1 | tee regress.out
endif
@echo "ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILE regress.out"
#
# run the parallel test suite
#
runcheck: $(INFILES)
runcheck: all
ifneq ($(PORTNAME), win)
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
$(SHELL) ./run_check.sh $(HOST)
$(SHELL) ./run_check.sh $(host_tuple)
else
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
./run_check.sh $(HOST)
./run_check.sh $(host_tuple)
endif
@echo "ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILES run_check.out"
@echo "AND regress.out"
......@@ -117,24 +144,27 @@ endif
#
# run the test including the huge extra tests
#
bigcheck: $(INFILES)
bigcheck: all
ifneq ($(PORTNAME), win)
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
$(SHELL) ./run_check.sh $(HOST) $(EXTRA_TESTS)
$(SHELL) ./run_check.sh $(host_tuple) $(EXTRA_TESTS)
else
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
./run_check.sh $(HOST) $(EXTRA_TESTS)
./run_check.sh $(host_tuple) $(EXTRA_TESTS)
endif
@echo "ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILES run_check.out"
@echo "AND regress.out"
clean:
rm -f $(INFILES) regress.out run_check.out regress.o regression.diffs
# clean up
clean distclean maintainer-clean:
# things built by `all' target
$(MAKE) -C $(contribdir)/spi clean
rm -f $(output_files) $(input_files) $(DLOBJS) regress.o pg_regress
# things created by various check targets
rm -rf results tmp_check log
rm -f regression.diffs regression.out regress.out run_check.out
ifeq ($(PORTNAME), win)
rm -f regress.def
endif
$(MAKE) -C sql clean
$(MAKE) -C expected clean
$(MAKE) -C results clean
$(MAKE) -C $(CONTRIB)/spi clean
rm -rf tmp_check
#-------------------------------------------------------------------------
#
# Makefile--
# Makefile for regress/expected (the regression test)
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/test/regress/expected/Attic/Makefile,v 1.5 2000/01/09 19:34:41 tgl Exp $
#
#-------------------------------------------------------------------------
CLFILES= create_function_1.out create_function_2.out copy.out constraints.out misc.out
clean:
rm -f $(CLFILES)
#-------------------------------------------------------------------------
#
# Makefile--
# Makefile for regress/input (the regression test)
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/test/regress/input/Attic/Makefile,v 1.9 2000/08/31 16:12:28 petere Exp $
#
#-------------------------------------------------------------------------
subdir = src/test/regress/input
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
#
# ... plus test query inputs
#
# INFILES is the files the regression test uses for input.
INFILES= copy.sql \
create_function_1.sql \
create_function_2.sql \
misc.sql \
constraints.sql
all: $(INFILES)
%.sql: %.source
if [ -z "$$USER" ]; then USER=$$LOGNAME; fi; \
if [ -z "$$USER" ]; then USER=`whoami`; fi; \
if [ -z "$$USER" ]; then echo 'Cannot deduce $$USER.'; exit 1; fi; \
rm -f $@; \
OBJ=`pwd`; \
sed -e "s:_OBJWD_:$$OBJ/\.\.:g" \
-e "s:_DLSUFFIX_:$(DLSUFFIX):g" \
-e "s:_LIBDIR_:$(libdir):g" \
-e "s/_USER_/$$USER/g" < $< > ../sql/$@
#-------------------------------------------------------------------------
#
# Makefile--
# Makefile for regress/output (the regression test)
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/test/regress/output/Attic/Makefile,v 1.11 2000/08/31 16:12:30 petere Exp $
#
#-------------------------------------------------------------------------
subdir = src/test/regress/output
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
#
# ... plus test query inputs
#
# INFILES is the files the regression test uses for input.
INFILES= copy.out \
create_function_1.out \
create_function_2.out \
misc.out \
constraints.out
all: $(INFILES)
%.out: %.source
if [ -z "$$USER" ]; then USER=$$LOGNAME; fi; \
if [ -z "$$USER" ]; then USER=`whoami`; fi; \
if [ -z "$$USER" ]; then echo 'Cannot deduce $$USER.'; exit 1; fi; \
rm -f $@; \
OBJ=`pwd`; \
sed -e "s:_OBJWD_:$$OBJ/\.\.:g" \
-e "s:_DLSUFFIX_:$(DLSUFFIX):g" \
-e "s:_LIBDIR_:$(libdir):g" \
-e "s/_USER_/$$USER/g" < $< | \
sed -e "s:output/\.\.:input/\.\.:g" > ../expected/$@
# ----------
# The first group of parallel test
# ----------
test: boolean char name varchar text int2 int4 int8 oid float4 float8 numeric
# Depends on things setup during char, varchar and text
test: strings
# Depends on int2, int4, int8, float4, float8
test: numerology
# ----------
# The second group of parallel test
# ----------
test: point lseg box path polygon circle date time timestamp interval abstime reltime tinterval inet comments oidjoins type_sanity opr_sanity
# Depends on point, lseg, box, path, polygon and circle
test: geometry
# Depends on interval, timestamp, reltime and abstime
test: horology
# ----------
# These four each depend on the previous one
# ----------
test: create_function_1
test: create_type
test: create_table
test: create_function_2
# ----------
# Load huge amounts of data
# We should split the data files into single files and then
# execute two copy tests parallel, to check that copy itself
# is concurrent safe.
# ----------
test: copy
# ----------
# The third group of parallel test
# ----------
test: constraints triggers create_misc create_aggregate create_operator create_index inherit
# Depends on the above
test: create_view
# ----------
# sanity_check does a vacuum, affecting the sort order of SELECT *
# results. So it should not run parallel to other tests.
# ----------
test: sanity_check
# ----------
# Believe it or not, select creates a table, subsequent
# tests need.
# ----------
test: errors
test: select
# ----------
# The fourth group of parallel test
# ----------
ignore: random
test: select_into select_distinct select_distinct_on select_implicit select_having subselect union case join aggregates transactions random portals arrays btree_index hash_index
test: misc
# ----------
# The fifth group of parallel test
# ----------
test: select_views alter_table portals_p2 rules foreign_key
# ----------
# The sixth group of parallel test
# ----------
# "plpgsql" cannot run concurrently with "rules"
test: limit plpgsql temp
This diff is collapsed.
#!/bin/sh
# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.52 2000/07/23 13:01:11 petere Exp $
# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.53 2000/09/29 17:17:37 petere Exp $
#
if [ $# -eq 0 ]; then
echo "Syntax: $0 <hostname> [extra-tests]"
......@@ -66,6 +66,8 @@ if [ -d ./obj ]; then
cd ./obj
fi
mkdir results
echo "=============== Notes... ================="
echo "postmaster must already be running for the regression tests to succeed."
echo "The time zone is set to PST8PDT for these tests by the client frontend."
......
#!/bin/sh
#
# $Header: /cvsroot/pgsql/src/test/regress/Attic/run_check.sh,v 1.25 2000/07/23 13:01:11 petere Exp $
# $Header: /cvsroot/pgsql/src/test/regress/Attic/run_check.sh,v 1.26 2000/09/29 17:17:37 petere Exp $
# ----------
# Check call syntax
......@@ -162,6 +162,7 @@ fi
echo "=============== Create ./tmp_check directory ================"
mkdir -p $CHKDIR
mkdir -p $LOGDIR
mkdir -p results
# ----------
......
test: boolean
test: char
test: name
test: varchar
test: text
test: strings
test: int2
test: int4
test: int8
test: oid
test: float4
test: float8
test: numerology
test: point
test: lseg
test: box
test: path
test: polygon
test: circle
test: geometry
test: date
test: time
test: timestamp
test: interval
test: abstime
test: reltime
test: tinterval
test: horology
test: inet
test: comments
test: oidjoins
test: type_sanity
test: opr_sanity
test: create_function_1
test: create_type
test: create_table
test: create_function_2
test: constraints
test: triggers
test: copy
test: create_misc
test: create_aggregate
test: create_operator
test: create_view
test: create_index
test: sanity_check
test: errors
test: select
test: select_into
test: select_distinct
test: select_distinct_on
test: select_implicit
test: select_having
test: subselect
test: union
test: case
test: join
test: aggregates
test: transactions
ignore: random
test: random
test: portals
test: misc
test: arrays
test: btree_index
test: hash_index
test: select_views
test: alter_table
test: portals_p2
test: rules
test: limit
test: plpgsql
test: temp
test: numeric
#-------------------------------------------------------------------------
#
# Makefile--
# Makefile for regress/sql (the regression test)
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/test/regress/sql/Attic/Makefile,v 1.5 2000/01/09 19:34:43 tgl Exp $
#
#-------------------------------------------------------------------------
CLFILES= create_function_1.sql create_function_2.sql copy.sql misc.sql constraints.sql
clean:
rm -f $(CLFILES)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment