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
|
2002-09-05 20:28:46 +02:00
|
|
|
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.40 2002/09/05 18:28:46 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
|
|
|
|
2001-02-20 20:20:30 +01:00
|
|
|
override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
|
2000-10-20 23:04:27 +02:00
|
|
|
override CFLAGS += $(CFLAGS_SL)
|
1997-01-18 09:01:32 +01:00
|
|
|
|
2002-09-05 20:28:46 +02:00
|
|
|
SHLIB_LINK = $(BE_DLLLIBS)
|
2001-04-04 23:15:56 +02:00
|
|
|
|
2002-09-03 23:45:44 +02:00
|
|
|
# default encoding
|
|
|
|
MULTIBYTE = SQL_ASCII
|
|
|
|
|
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' \
|
2001-09-16 18:11:11 +02:00
|
|
|
-e 's,@pkglibdir@,$(pkglibdir),g' \
|
2000-09-29 19:17:41 +02:00
|
|
|
-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-11-22 00:40:28 +01:00
|
|
|
-e 's/@GCC@/$(GCC)/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)
|
|
|
|
|
2000-10-27 22:00:22 +02:00
|
|
|
abs_srcdir := $(shell cd $(srcdir) && pwd)
|
|
|
|
abs_builddir := $(shell pwd)
|
2000-09-29 19:17:41 +02:00
|
|
|
|
2000-10-27 22:00:22 +02:00
|
|
|
define sed-command
|
|
|
|
sed -e 's,@abs_srcdir@,$(abs_srcdir),g' \
|
|
|
|
-e 's,@abs_builddir@,$(abs_builddir),g' \
|
|
|
|
-e 's/@DLSUFFIX@/$(DLSUFFIX)/g' $< >$@
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(input_files): sql/%.sql: input/%.source
|
|
|
|
$(sed-command)
|
|
|
|
|
|
|
|
$(output_files): expected/%.out: output/%.source
|
|
|
|
$(sed-command)
|
|
|
|
|
|
|
|
# When doing a VPATH build, copy over the remaining .sql and .out
|
|
|
|
# files so that the driver script can find them. We have to use an
|
|
|
|
# absolute path for the targets, because otherwise make will try to
|
|
|
|
# locate the missing files using VPATH, and will find them in
|
|
|
|
# $(srcdir), but the point here is that we want to copy them from
|
|
|
|
# $(srcdir) to the build directory.
|
|
|
|
|
|
|
|
ifdef VPATH
|
2002-01-08 22:00:30 +01:00
|
|
|
remaining_files_src := $(wildcard $(srcdir)/sql/*.sql) $(wildcard $(srcdir)/expected/*.out) $(srcdir)/resultmap
|
2000-10-27 22:00:22 +02:00
|
|
|
remaining_files_build := $(patsubst $(srcdir)/%, $(abs_builddir)/%, $(remaining_files_src))
|
|
|
|
|
|
|
|
all: $(remaining_files_build)
|
|
|
|
$(remaining_files_build): $(abs_builddir)/%: $(srcdir)/%
|
|
|
|
ln -s $< $@
|
|
|
|
endif
|
2000-09-29 19:17:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
# 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-27 22:00:22 +02:00
|
|
|
$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE)
|
2000-09-29 19:17:41 +02:00
|
|
|
|
|
|
|
installcheck: all
|
2000-10-27 22:00:22 +02:00
|
|
|
$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE)
|
2000-09-29 19:17:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
# old interfaces follow...
|
|
|
|
|
2000-11-22 14:16:24 +01:00
|
|
|
runcheck: check
|
|
|
|
runtest: installcheck
|
1997-01-18 09:01:32 +01:00
|
|
|
|
2000-11-22 14:16:24 +01:00
|
|
|
bigtest:
|
|
|
|
$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) numeric_big
|
1999-11-19 19:51:52 +01:00
|
|
|
|
2000-11-22 14:16:24 +01:00
|
|
|
bigcheck:
|
|
|
|
$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) numeric_big
|
1999-11-19 19:51:52 +01:00
|
|
|
|
2000-09-29 19:17:41 +02:00
|
|
|
|
2000-11-22 14:16:24 +01:00
|
|
|
##
|
|
|
|
## Clean up
|
|
|
|
##
|
2000-09-29 19:17:41 +02:00
|
|
|
|
|
|
|
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
|
2002-07-02 07:43:34 +02:00
|
|
|
rm -rf results tmp_check log
|
2000-09-29 19:17:41 +02:00
|
|
|
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
|
2000-10-27 22:00:22 +02:00
|
|
|
ifdef VPATH
|
|
|
|
rm -f $(remaining_files_build)
|
|
|
|
endif
|