1997-01-18 09:01:32 +01:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
2000-01-09 08:54:00 +01:00
|
|
|
# GNUmakefile--
|
|
|
|
# Makefile for regress (the regression tests)
|
1997-01-18 09:01:32 +01:00
|
|
|
#
|
|
|
|
# Copyright (c) 1994, Regents of the University of California
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# IDENTIFICATION
|
2000-10-23 23:44:12 +02:00
|
|
|
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.29 2000/10/23 21:44:07 petere Exp $
|
1997-01-18 09:01:32 +01:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
2000-07-23 15:01:11 +02:00
|
|
|
subdir = src/test/regress
|
|
|
|
top_builddir = ../../..
|
|
|
|
include $(top_builddir)/src/Makefile.global
|
1997-01-18 09:01:32 +01:00
|
|
|
|
2000-09-29 19:17:41 +02:00
|
|
|
contribdir := $(top_builddir)/contrib
|
2000-01-09 08:54:00 +01:00
|
|
|
|
2000-10-20 23:04:27 +02:00
|
|
|
override CPPFLAGS += -I$(libpq_srcdir)
|
|
|
|
override CFLAGS += $(CFLAGS_SL)
|
1997-01-18 09:01:32 +01:00
|
|
|
|
1997-04-12 11:34:31 +02:00
|
|
|
|
2000-09-29 19:17:41 +02:00
|
|
|
##
|
|
|
|
## 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' \
|
2000-10-07 22:23:03 +02:00
|
|
|
-e 's,@GMAKE@,$(MAKE),g' \
|
2000-10-23 23:44:12 +02:00
|
|
|
-e 's/@enable_shared@/$(enable_shared)/g' \
|
2000-09-29 19:17:41 +02:00
|
|
|
$< >$@
|
|
|
|
chmod a+x $@
|
|
|
|
|
|
|
|
|
|
|
|
# Build dynamically-loaded object file for CREATE FUNCTION ... LANGUAGE 'C'.
|
|
|
|
|
|
|
|
DLOBJS := regress$(DLSUFFIX)
|
|
|
|
# This is for some platforms
|
1997-01-18 09:01:32 +01:00
|
|
|
ifdef EXPSUFF
|
2000-09-29 19:17:41 +02:00
|
|
|
DLOBJS += regress$(EXPSUFF)
|
1997-01-18 09:01:32 +01:00
|
|
|
endif
|
|
|
|
|
2000-09-29 19:17:41 +02:00
|
|
|
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
|
2000-10-02 08:07:25 +02:00
|
|
|
$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --schedule=parallel_schedule --multibyte=$(MULTIBYTE)
|
2000-09-29 19:17:41 +02:00
|
|
|
|
|
|
|
installcheck: all
|
2000-10-02 08:07:25 +02:00
|
|
|
$(SHELL) ./pg_regress --schedule=serial_schedule --multibyte=$(MULTIBYTE)
|
2000-09-29 19:17:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
# old interfaces follow...
|
|
|
|
|
1999-06-10 19:49:32 +02:00
|
|
|
#
|
|
|
|
# huge extra tests run in target bigtest
|
|
|
|
#
|
|
|
|
EXTRA_TESTS = numeric_big
|
|
|
|
|
1997-01-18 09:01:32 +01:00
|
|
|
#
|
2000-01-09 08:54:00 +01:00
|
|
|
# run the tests
|
1997-01-18 09:01:32 +01:00
|
|
|
#
|
2000-09-29 19:17:41 +02:00
|
|
|
runtest: all
|
1999-01-17 07:20:06 +01:00
|
|
|
ifneq ($(PORTNAME), win)
|
|
|
|
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
|
2000-09-29 19:17:41 +02:00
|
|
|
$(SHELL) ./regress.sh $(host_tuple) 2>&1 | tee regress.out
|
1999-01-17 07:20:06 +01:00
|
|
|
else
|
1998-07-26 06:31:41 +02:00
|
|
|
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
|
2000-09-29 19:17:41 +02:00
|
|
|
./regress.sh $(host_tuple) 2>&1 | tee regress.out
|
1999-06-10 19:49:32 +02:00
|
|
|
endif
|
|
|
|
@echo "ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILE regress.out"
|
|
|
|
@echo ""
|
1999-06-28 20:40:34 +02:00
|
|
|
@echo "To run the optional big test(s) too, type 'make bigtest'"
|
|
|
|
@echo "These big tests can take over an hour to complete"
|
1999-06-10 19:49:32 +02:00
|
|
|
@echo "These actually are: $(EXTRA_TESTS)"
|
|
|
|
|
|
|
|
#
|
|
|
|
# run the test including the huge extra tests
|
|
|
|
#
|
2000-09-29 19:17:41 +02:00
|
|
|
bigtest: all
|
1999-06-10 19:49:32 +02:00
|
|
|
ifneq ($(PORTNAME), win)
|
|
|
|
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
|
2000-09-29 19:17:41 +02:00
|
|
|
$(SHELL) ./regress.sh $(host_tuple) $(EXTRA_TESTS) 2>&1 | tee regress.out
|
1999-06-10 19:49:32 +02:00
|
|
|
else
|
|
|
|
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
|
2000-09-29 19:17:41 +02:00
|
|
|
./regress.sh $(host_tuple) $(EXTRA_TESTS) 2>&1 | tee regress.out
|
1999-01-17 07:20:06 +01:00
|
|
|
endif
|
1997-01-18 09:01:32 +01:00
|
|
|
@echo "ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILE regress.out"
|
|
|
|
|
1999-11-19 19:51:52 +01:00
|
|
|
#
|
|
|
|
# run the parallel test suite
|
|
|
|
#
|
2000-09-29 19:17:41 +02:00
|
|
|
runcheck: all
|
1999-11-19 19:51:52 +01:00
|
|
|
ifneq ($(PORTNAME), win)
|
|
|
|
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
|
2000-10-18 18:16:18 +02:00
|
|
|
MAKE=$(MAKE);export MAKE; \
|
2000-09-29 19:17:41 +02:00
|
|
|
$(SHELL) ./run_check.sh $(host_tuple)
|
1999-11-19 19:51:52 +01:00
|
|
|
else
|
|
|
|
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
|
2000-10-18 18:16:18 +02:00
|
|
|
MAKE=$(MAKE);export MAKE; \
|
2000-09-29 19:17:41 +02:00
|
|
|
./run_check.sh $(host_tuple)
|
1999-11-19 19:51:52 +01:00
|
|
|
endif
|
|
|
|
@echo "ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILES run_check.out"
|
|
|
|
@echo "AND regress.out"
|
|
|
|
@echo ""
|
|
|
|
@echo "To run the optional big test(s) too, type 'make bigcheck'"
|
|
|
|
@echo "These big tests can take over an hour to complete"
|
|
|
|
@echo "These actually are: $(EXTRA_TESTS)"
|
|
|
|
|
|
|
|
#
|
|
|
|
# run the test including the huge extra tests
|
|
|
|
#
|
2000-09-29 19:17:41 +02:00
|
|
|
bigcheck: all
|
1999-11-19 19:51:52 +01:00
|
|
|
ifneq ($(PORTNAME), win)
|
|
|
|
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
|
2000-10-18 18:16:18 +02:00
|
|
|
MAKE=$(MAKE);export MAKE; \
|
2000-09-29 19:17:41 +02:00
|
|
|
$(SHELL) ./run_check.sh $(host_tuple) $(EXTRA_TESTS)
|
1999-11-19 19:51:52 +01:00
|
|
|
else
|
|
|
|
MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
|
2000-10-18 18:16:18 +02:00
|
|
|
MAKE=$(MAKE);export MAKE; \
|
2000-09-29 19:17:41 +02:00
|
|
|
./run_check.sh $(host_tuple) $(EXTRA_TESTS)
|
1999-11-19 19:51:52 +01:00
|
|
|
endif
|
|
|
|
@echo "ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILES run_check.out"
|
|
|
|
@echo "AND regress.out"
|
|
|
|
|
2000-09-29 19:17:41 +02:00
|
|
|
|
|
|
|
# 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
|
1999-01-17 07:20:06 +01:00
|
|
|
ifeq ($(PORTNAME), win)
|
|
|
|
rm -f regress.def
|
|
|
|
endif
|