1 #-------------------------------------------------------------------------
4 # Makefile for regress (the regression tests)
6 # Copyright (c) 1994, Regents of the University of California
10 # $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.27 2000/10/18 16:16:14 momjian Exp $
12 #-------------------------------------------------------------------------
14 subdir = src/test/regress
15 top_builddir = ../../..
16 include $(top_builddir)/src/Makefile.global
18 contribdir := $(top_builddir)/contrib
20 CFLAGS+= -I$(libpq_srcdir) $(CFLAGS_SL)
29 # Build regression test driver
33 pg_regress: pg_regress.sh GNUmakefile
34 sed -e 's,@bindir@,$(bindir),g' \
35 -e 's,@libdir@,$(libdir),g' \
36 -e 's,@datadir@,$(datadir),g' \
37 -e 's/@VERSION@/$(VERSION)/g' \
38 -e 's/@host_tuple@/$(host_tuple)/g' \
39 -e 's,@GMAKE@,$(MAKE),g' \
44 # Build dynamically-loaded object file for CREATE FUNCTION ... LANGUAGE 'C'.
46 DLOBJS := regress$(DLSUFFIX)
47 # This is for some platforms
49 DLOBJS += regress$(EXPSUFF)
55 # Build test input and expected files
57 file_list := copy create_function_1 create_function_2 misc constraints
58 input_files := $(foreach file, $(file_list), sql/$(file).sql)
59 output_files := $(foreach file, $(file_list), expected/$(file).out)
61 all: $(input_files) $(output_files)
63 sql/%.sql: input/%.source
64 pwd=`pwd` && sed "s,_OBJWD_,$$pwd,g;s/_DLSUFFIX_/$(DLSUFFIX)/g" $(srcdir)/$< >$@
66 expected/%.out: output/%.source
67 pwd=`pwd` && sed "s,_OBJWD_,$$pwd,g;s/_DLSUFFIX_/$(DLSUFFIX)/g" $(srcdir)/$< >$@
70 # And finally some extra C modules...
76 $(MAKE) -C $(contribdir)/spi REFINT_VERBOSE=1 refint$(DLSUFFIX) autoinc$(DLSUFFIX)
84 $(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --schedule=parallel_schedule --multibyte=$(MULTIBYTE)
87 $(SHELL) ./pg_regress --schedule=serial_schedule --multibyte=$(MULTIBYTE)
90 # old interfaces follow...
93 # huge extra tests run in target bigtest
95 EXTRA_TESTS = numeric_big
101 ifneq ($(PORTNAME), win)
102 MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
103 $(SHELL) ./regress.sh $(host_tuple) 2>&1 | tee regress.out
105 MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
106 ./regress.sh $(host_tuple) 2>&1 | tee regress.out
108 @echo "ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILE regress.out"
110 @echo "To run the optional big test(s) too, type 'make bigtest'"
111 @echo "These big tests can take over an hour to complete"
112 @echo "These actually are: $(EXTRA_TESTS)"
115 # run the test including the huge extra tests
118 ifneq ($(PORTNAME), win)
119 MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
120 $(SHELL) ./regress.sh $(host_tuple) $(EXTRA_TESTS) 2>&1 | tee regress.out
122 MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
123 ./regress.sh $(host_tuple) $(EXTRA_TESTS) 2>&1 | tee regress.out
125 @echo "ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILE regress.out"
128 # run the parallel test suite
131 ifneq ($(PORTNAME), win)
132 MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
133 MAKE=$(MAKE);export MAKE; \
134 $(SHELL) ./run_check.sh $(host_tuple)
136 MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
137 MAKE=$(MAKE);export MAKE; \
138 ./run_check.sh $(host_tuple)
140 @echo "ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILES run_check.out"
141 @echo "AND regress.out"
143 @echo "To run the optional big test(s) too, type 'make bigcheck'"
144 @echo "These big tests can take over an hour to complete"
145 @echo "These actually are: $(EXTRA_TESTS)"
148 # run the test including the huge extra tests
151 ifneq ($(PORTNAME), win)
152 MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
153 MAKE=$(MAKE);export MAKE; \
154 $(SHELL) ./run_check.sh $(host_tuple) $(EXTRA_TESTS)
156 MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
157 MAKE=$(MAKE);export MAKE; \
158 ./run_check.sh $(host_tuple) $(EXTRA_TESTS)
160 @echo "ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILES run_check.out"
161 @echo "AND regress.out"
166 clean distclean maintainer-clean:
167 # things built by `all' target
168 $(MAKE) -C $(contribdir)/spi clean
169 rm -f $(output_files) $(input_files) $(DLOBJS) regress.o pg_regress
170 # things created by various check targets
171 rm -rf results tmp_check log
172 rm -f regression.diffs regression.out regress.out run_check.out
173 ifeq ($(PORTNAME), win)