Skip to content

Commit 8a489b8

Browse files
authored
Merge pull request #154 from postgrespro/PGPRO-13969
[PGPRO-13969] Fix a problem with isolation tests in v12 and v13 when using pgxs
2 parents 065accd + a16ce5f commit 8a489b8

File tree

1 file changed

+32
-26
lines changed

1 file changed

+32
-26
lines changed

Makefile

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ RELATIVE_INCLUDES = $(addprefix src/, $(INCLUDES))
2121

2222
LDFLAGS_SL += $(filter -lm, $(LIBS))
2323

24-
REGRESS = security rum rum_validate rum_hash ruminv timestamp orderby orderby_hash \
25-
altorder altorder_hash limits \
24+
REGRESS = security rum rum_validate rum_hash ruminv timestamp \
25+
orderby orderby_hash altorder altorder_hash limits \
2626
int2 int4 int8 float4 float8 money oid \
2727
time timetz date interval \
2828
macaddr inet cidr text varchar char bytea bit varbit \
29-
numeric rum_weight expr
29+
numeric rum_weight expr array
3030

3131
TAP_TESTS = 1
3232

@@ -35,15 +35,6 @@ ISOLATION_OPTS = --load-extension=rum
3535
EXTRA_CLEAN = pglist_tmp
3636

3737
ifdef USE_PGXS
38-
39-
# We cannot run isolation test for versions 12,13 in PGXS case
40-
# because 'pg_isolation_regress' is not copied to install
41-
# directory, see src/test/isolation/Makefile
42-
ifeq ($(MAJORVERSION),$(filter 12% 13%,$(MAJORVERSION)))
43-
undefine ISOLATION
44-
undefine ISOLATION_OPTS
45-
endif
46-
4738
PG_CONFIG = pg_config
4839
PGXS := $(shell $(PG_CONFIG) --pgxs)
4940
include $(PGXS)
@@ -57,25 +48,35 @@ endif
5748
$(EXTENSION)--$(EXTVERSION).sql: rum_init.sql
5849
cat $^ > $@
5950

60-
ifeq ($(MAJORVERSION), 9.6)
61-
# arrays are not supported on 9.6
62-
else
63-
REGRESS += array
51+
#
52+
# On versions 12 and 13 isolation tests cannot be run using pgxs.
53+
# Override installcheck target to avoid the error. This is just a
54+
# shortcut version of installcheck target from pgxs.mk that runs
55+
# all other tests besides isolation tests.
56+
#
57+
ifdef USE_PGXS
58+
ifeq ($(MAJORVERSION), $(filter 12% 13%, $(MAJORVERSION)))
59+
installcheck: submake $(REGRESS_PREP)
60+
ifdef REGRESS
61+
$(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS)
62+
endif
63+
ifdef TAP_TESTS
64+
$(prove_installcheck)
65+
endif
66+
endif
6467
endif
6568

66-
# For 9.6-11 we have to make specific target with tap tests
69+
# --------------------------------------------------------
70+
# Make conditional targets to save backward compatibility
71+
# with PG11, PG10 and PG9.6.
72+
# --------------------------------------------------------
6773
ifeq ($(MAJORVERSION), $(filter 9.6% 10% 11%, $(MAJORVERSION)))
68-
wal-check: temp-install
69-
$(prove_check)
7074

71-
check: wal-check
75+
# arrays are not supported on 9.6
76+
ifeq ($(MAJORVERSION), 9.6)
77+
REGRESS := $(filter-out array, $(REGRESS))
7278
endif
7379

74-
#
75-
# Make conditional targets to save backward compatibility with PG11, PG10 and PG9.6.
76-
#
77-
ifeq ($(MAJORVERSION), $(filter 9.6% 10% 11%, $(MAJORVERSION)))
78-
7980
install: installincludes
8081

8182
installincludes:
@@ -99,4 +100,9 @@ isolationcheck: | submake-isolation submake-rum temp-install
99100
$(pg_isolation_regress_check) \
100101
--temp-config $(top_srcdir)/contrib/rum/logical.conf \
101102
$(ISOLATIONCHECKS)
102-
endif
103+
104+
# For 9.6-11 we have to make specific target with tap tests
105+
check: temp-install
106+
$(prove_check)
107+
108+
endif

0 commit comments

Comments
 (0)