Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Allow make check in PL directories

Also add make check-world target, and refactor pg_regress invocation
code in makefiles a bit.
  • Loading branch information...
commit 2fd77060a2db814146cf1f6cf77755a4b4fd9a80 1 parent 0d90dc1
Peter Eisentraut petere authored
5 GNUmakefile.in
@@ -60,6 +60,9 @@ check: all
60 60 check installcheck installcheck-parallel:
61 61 $(MAKE) -C src/test $@
62 62
  63 +# TODO: add contrib
  64 +$(call recurse,check-world,src/test src/pl src/interfaces/ecpg,check)
  65 +
63 66 $(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib,installcheck)
64 67
65 68 GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
@@ -121,4 +124,4 @@ distcheck: dist
121 124 rm -rf $(distdir) $(dummy)
122 125 @echo "Distribution integrity checks out."
123 126
124   -.PHONY: dist distdir distcheck docs install-docs world install-world installcheck-world
  127 +.PHONY: dist distdir distcheck docs install-docs world check-world install-world installcheck-world
2  Makefile
@@ -11,7 +11,7 @@
11 11 # GNUmakefile won't exist yet, so we catch that case as well.
12 12
13 13
14   -all check install installdirs installcheck installcheck-parallel uninstall clean distclean maintainer-clean dist distcheck world install-world installcheck-world:
  14 +all check install installdirs installcheck installcheck-parallel uninstall clean distclean maintainer-clean dist distcheck world check-world install-world installcheck-world:
15 15 @if [ ! -f GNUmakefile ] ; then \
16 16 echo "You need to run the 'configure' program first. See the file"; \
17 17 echo "'INSTALL' for installation instructions." ; \
16 src/Makefile.global.in
@@ -285,9 +285,6 @@ XGETTEXT = @XGETTEXT@
285 285 GZIP = gzip
286 286 BZIP2 = bzip2
287 287
288   -PL_TESTDB = pl_regression
289   -CONTRIB_TESTDB = contrib_regression
290   -
291 288 # Installation.
292 289
293 290 INSTALL = $(SHELL) $(top_srcdir)/config/install-sh -c
@@ -428,6 +425,19 @@ submake-libpgport:
428 425
429 426 ##########################################################################
430 427 #
  428 +# Testing support
  429 +
  430 +PL_TESTDB = pl_regression
  431 +CONTRIB_TESTDB = contrib_regression
  432 +
  433 +pg_regress_check = $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --temp-install=./tmp_check --top-builddir=$(top_builddir)
  434 +pg_regress_installcheck = $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR)
  435 +
  436 +pg_regress_clean_files = results/ regression.diffs regression.out tmp_check/ log/
  437 +
  438 +
  439 +##########################################################################
  440 +#
431 441 # Customization
432 442 #
433 443 # This includes your local customizations if Makefile.custom exists
8 src/makefiles/pgxs.mk
@@ -231,8 +231,7 @@ ifdef EXTRA_CLEAN
231 231 endif
232 232 ifdef REGRESS
233 233 # things created by various check targets
234   - rm -rf results tmp_check log
235   - rm -f regression.diffs regression.out regress.out run_check.out
  234 + rm -rf $(pg_regress_clean_files)
236 235 ifeq ($(PORTNAME), win)
237 236 rm -f regress.def
238 237 endif
@@ -280,12 +279,11 @@ endif
280 279
281 280 # against installed postmaster
282 281 installcheck: submake
283   - $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
  282 + $(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS)
284 283
285 284 # in-tree test doesn't work yet (no way to install my shared library)
286 285 #check: all submake
287   -# $(top_builddir)/src/test/regress/pg_regress --temp-install \
288   -# --top-builddir=$(top_builddir) $(REGRESS_OPTS) $(REGRESS)
  286 +# $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
289 287 check:
290 288 @echo "'make check' is not supported."
291 289 @echo "Do 'make install', then 'make installcheck' instead."
2  src/pl/plperl/.gitignore
@@ -4,4 +4,6 @@
4 4 /plperl_opmask.h
5 5
6 6 # Generated subdirectories
  7 +/log/
7 8 /results/
  9 +/tmp_check/
8 src/pl/plperl/GNUmakefile
@@ -76,8 +76,11 @@ installdirs: installdirs-lib
76 76
77 77 uninstall: uninstall-lib
78 78
  79 +check: submake
  80 + $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
  81 +
79 82 installcheck: submake
80   - $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
  83 + $(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS)
81 84
82 85 .PHONY: submake
83 86 submake:
@@ -85,8 +88,7 @@ submake:
85 88
86 89 clean distclean maintainer-clean: clean-lib
87 90 rm -f SPI.c Util.c $(OBJS) perlchunks.h plperl_opmask.h
88   - rm -rf results
89   - rm -f regression.diffs regression.out
  91 + rm -rf $(pg_regress_clean_files)
90 92
91 93 else # can't build
92 94
2  src/pl/plpython/.gitignore
... ... @@ -1,2 +1,4 @@
1 1 # Generated subdirectories
  2 +/log/
2 3 /results/
  4 +/tmp_check/
13 src/pl/plpython/Makefile
@@ -120,13 +120,19 @@ prep3:
120 120 clean3:
121 121 rm -rf python3/
122 122
  123 +check: submake prep3
  124 + $(pg_regress_check) --inputdir=./python3 --outputdir=./python3 $(REGRESS_OPTS) $(REGRESS)
  125 +
123 126 installcheck: submake prep3
124   - $(top_builddir)/src/test/regress/pg_regress --inputdir=./python3 --outputdir=./python3 --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
  127 + $(pg_regress_installcheck) --inputdir=./python3 --outputdir=./python3 $(REGRESS_OPTS) $(REGRESS)
125 128
126 129 clean: clean3
127 130 else
  131 +check: submake
  132 + $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
  133 +
128 134 installcheck: submake
129   - $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
  135 + $(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS)
130 136 endif
131 137
132 138 .PHONY: submake
@@ -135,8 +141,7 @@ submake:
135 141
136 142 clean distclean maintainer-clean: clean-lib
137 143 rm -f $(OBJS)
138   - rm -rf results
139   - rm -f regression.diffs regression.out
  144 + rm -rf $(pg_regress_clean_files)
140 145 ifeq ($(PORTNAME), win32)
141 146 rm -f python${pytverstr}.def
142 147 endif
2  src/pl/tcl/.gitignore
... ... @@ -1,2 +1,4 @@
1 1 # Generated subdirectories
  2 +/log/
2 3 /results/
  4 +/tmp_check/
8 src/pl/tcl/Makefile
@@ -58,8 +58,11 @@ installdirs: installdirs-lib
58 58 uninstall: uninstall-lib
59 59 $(MAKE) -C modules $@
60 60
  61 +check: submake
  62 + $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
  63 +
61 64 installcheck: submake
62   - $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
  65 + $(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS)
63 66
64 67 .PHONY: submake
65 68 submake:
@@ -77,6 +80,5 @@ endif # TCL_SHARED_BUILD = 0
77 80
78 81 clean distclean maintainer-clean: clean-lib
79 82 rm -f $(OBJS)
80   - rm -rf results
81   - rm -f regression.diffs regression.out
  83 + rm -rf $(pg_regress_clean_files)
82 84 $(MAKE) -C modules $@
17 src/test/regress/GNUmakefile
@@ -138,19 +138,19 @@ tablespace-setup:
138 138 ## Run tests
139 139 ##
140 140
141   -pg_regress_call = ./pg_regress --inputdir=$(srcdir) --dlpath=. $(if $(MULTIBYTE),--multibyte=$(MULTIBYTE)) $(NOLOCALE)
  141 +REGRESS_OPTS = --dlpath=. $(if $(MULTIBYTE),--multibyte=$(MULTIBYTE)) $(NOLOCALE)
142 142
143 143 check: all tablespace-setup
144   - $(pg_regress_call) --temp-install=./tmp_check --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(TEMP_CONF) $(EXTRA_TESTS)
  144 + $(pg_regress_check) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(TEMP_CONF) $(EXTRA_TESTS)
145 145
146 146 installcheck: all tablespace-setup
147   - $(pg_regress_call) --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule $(EXTRA_TESTS)
  147 + $(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/serial_schedule $(EXTRA_TESTS)
148 148
149 149 installcheck-parallel: all tablespace-setup
150   - $(pg_regress_call) --psqldir=$(PSQLDIR) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(EXTRA_TESTS)
  150 + $(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(EXTRA_TESTS)
151 151
152 152 standbycheck: all
153   - $(pg_regress_call) --psqldir=$(PSQLDIR) --schedule=$(srcdir)/standby_schedule --use-existing
  153 + $(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/standby_schedule --use-existing
154 154
155 155 # old interfaces follow...
156 156
@@ -159,10 +159,10 @@ runtest: installcheck
159 159 runtest-parallel: installcheck-parallel
160 160
161 161 bigtest: all tablespace-setup
162   - $(pg_regress_call) --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule numeric_big
  162 + $(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/serial_schedule numeric_big
163 163
164 164 bigcheck: all tablespace-setup
165   - $(pg_regress_call) --temp-install=./tmp_check --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) numeric_big
  165 + $(pg_regress_check) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) numeric_big
166 166
167 167
168 168 ##
@@ -176,5 +176,4 @@ clean distclean maintainer-clean: clean-lib
176 176 # things created by various check targets
177 177 rm -f $(output_files) $(input_files)
178 178 rm -rf testtablespace
179   - rm -rf results tmp_check log
180   - rm -f regression.diffs regression.out regress.out run_check.out
  179 + rm -rf $(pg_regress_clean_files)
2  src/test/regress/pg_regress.c
@@ -2094,7 +2094,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
2094 2094 /* "make install" */
2095 2095 #ifndef WIN32_ONLY_COMPILER
2096 2096 snprintf(buf, sizeof(buf),
2097   - SYSTEMQUOTE "\"%s\" -C \"%s\" DESTDIR=\"%s/install\" install with_perl=no with_python=no > \"%s/log/install.log\" 2>&1" SYSTEMQUOTE,
  2097 + SYSTEMQUOTE "\"%s\" -C \"%s\" DESTDIR=\"%s/install\" install > \"%s/log/install.log\" 2>&1" SYSTEMQUOTE,
2098 2098 makeprog, top_builddir, temp_install, outputdir);
2099 2099 #else
2100 2100 snprintf(buf, sizeof(buf),

0 comments on commit 2fd7706

Please sign in to comment.
Something went wrong with that request. Please try again.