Skip to content

Commit 431cdb7

Browse files
committed
Do not run tap tests when PG < 15, tap tests are used to test replication
1 parent 53952e7 commit 431cdb7

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,15 @@ TESTS = 01_username 02_password 03_rename 04_alter_pwd \
2222

2323
REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
2424

25-
TAP_TESTS = 1
26-
2725
PG_CONFIG = pg_config
26+
27+
# Extract the major version number
28+
PG_MAJORVERSION := $(shell $(PG_CONFIG) --version | sed -e 's/^[a-zA-Z ]*//' -e 's/\..*//')
29+
30+
# Check if major version is greater than or equal to 15 to run tap test
31+
ifeq ($(shell test $(PG_MAJORVERSION) -ge 15; echo $$?),0)
32+
TAP_TESTS = 1
33+
endif
34+
2835
PGXS := $(shell $(PG_CONFIG) --pgxs)
2936
include $(PGXS)

0 commit comments

Comments
 (0)