修订版 | 0f591481e2a4dec4c95e2c7806be213be7d45aad (tree) |
---|---|
时间 | 2015-08-18 21:17:45 |
作者 | Kyotaro Horiguchi <horiguchi.kyotaro@lab....> |
Commiter | Kyotaro Horiguchi |
Follow the change of regression test framework.
pg_regress no longer installs extra modules since 9.5. This commit
makes Makefile to give --extra-install flag to pg_regress only when
required.
@@ -15,10 +15,12 @@ CHECKING=$(shell echo $(LAST_LIBPATH)| grep './tmp_check/install/' | wc -l) | ||
15 | 15 | |
16 | 16 | EXTENSION = pg_dbms_stats |
17 | 17 | |
18 | -REGRESS = init-common ut_fdw_init init-$(MAJORVERSION) ut-common \ | |
19 | - ut-$(MAJORVERSION) ut_imp_exp-$(MAJORVERSION) | |
18 | +REGRESS = init-common ut_fdw_init init-$(REGTESTVER) ut-common \ | |
19 | + ut-$(REGTESTVER) ut_imp_exp-$(REGTESTVER) | |
20 | +EXTRA_INSTALL = contrib/file_fdw | |
20 | 21 | |
21 | -REGRESS_OPTS = --encoding=UTF8 --temp-config=regress.conf --extra-install=contrib/file_fdw | |
22 | +# Before 9.5 needs extra-install flag for pg_regress | |
23 | +REGRESS_OPTS = --encoding=UTF8 --temp-config=regress.conf $(if $(filter 0,$(shell test "$(MAJORVERSION)" \< "9.5"; echo $$?)),--extra-install=$(EXTRA_INSTALL)) | |
22 | 24 | |
23 | 25 | DATA = pg_dbms_stats--1.3.6.sql pg_dbms_stats--1.0--1.3.2.sql pg_dbms_stats--1.3.2--1.3.3.sql pg_dbms_stats--1.3.3--1.3.4.sql pg_dbms_stats--1.3.4--1.3.5.sql pg_dbms_stats--1.3.5--1.3.6.sql |
24 | 26 |
@@ -55,9 +57,8 @@ include $(top_builddir)/src/Makefile.global | ||
55 | 57 | include $(top_srcdir)/contrib/contrib-global.mk |
56 | 58 | endif |
57 | 59 | |
58 | -ifeq "$(MAJORVERSION)" "9.5" | |
59 | -MAJORVERSION=9.4 | |
60 | -endif | |
60 | +# Some versions makes no difference in regard to regression test | |
61 | +REGTESTVER = $(if $(filter 0,$(shell test "$(MAJORVERSION)" \< "9.4"; echo $$?)),$(MAJORVERSION),9.4) | |
61 | 62 | |
62 | 63 | TARSOURCES = Makefile *.c *.h \ |
63 | 64 | $(EXTDIR)/pg_dbms_stats--*-9.*.sql \ |
@@ -73,7 +74,7 @@ rpms: rpm94 rpm93 rpm92 rpm91 | ||
73 | 74 | |
74 | 75 | sourcetar: $(STARBALL) |
75 | 76 | |
76 | -$(DATA): %.sql: $(EXTDIR)/%-$(MAJORVERSION).sql | |
77 | +$(DATA): %.sql: $(EXTDIR)/%-$(REGTESTVER).sql | |
77 | 78 | cp $< $@ |
78 | 79 | |
79 | 80 | $(STARBALLS): $(TARSOURCES) |