Skip to content

Commit b959fba

Browse files
author
Karina Litskevich
committed
[PGPRO-13969] Fix a problem with isolation tests in v12 and v13 when using pgxs
Before commit 2203ede9 in PG14 running isolation test using PGXS was not working - an error occurred. This is a hack to avoid the error. Tags: rum
1 parent 065accd commit b959fba

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

Makefile

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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)
@@ -99,4 +90,22 @@ isolationcheck: | submake-isolation submake-rum temp-install
9990
$(pg_isolation_regress_check) \
10091
--temp-config $(top_srcdir)/contrib/rum/logical.conf \
10192
$(ISOLATIONCHECKS)
102-
endif
93+
endif
94+
95+
#
96+
# On versions 12 and 13 isolation tests cannot be run using pgxs.
97+
# Override installcheck target to avoid the error. This is just a stripped down
98+
# version of installcheck target from pgxs.mk that runs all other tests besides
99+
# isolation tests.
100+
#
101+
ifdef USE_PGXS
102+
ifeq ($(MAJORVERSION), $(filter 12% 13%, $(MAJORVERSION)))
103+
installcheck: submake $(REGRESS_PREP)
104+
ifdef REGRESS
105+
$(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS)
106+
endif
107+
ifdef TAP_TESTS
108+
$(prove_installcheck)
109+
endif
110+
endif
111+
endif

0 commit comments

Comments
 (0)