Skip to content

Commit

Permalink
Work around substition of @src_absdir@ in tests and results.
Browse files Browse the repository at this point in the history
Changes in pg15 break current tests.
See
postgres/postgres@d1029bb
  • Loading branch information
pramsey committed Oct 17, 2022
1 parent 4fd348a commit 8130dc9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,26 @@ ifeq ($(HAS_IMPORT_SCHEMA),yes)
REGRESS += import
endif

# work around pg15 change to regression file variable
# substitution for @abs_srcdir@ until we can drop older
# version support
# https://github.com/postgres/postgres/commit/d1029bb5a26cb84b116b0dee4dde312291359f2a
PG15 := $(shell [ $(PG_VERSION_NUM) -ge 90500 ] && echo yes)
ifeq ($(PG15),yes)

sql/%.sql: input/%.source
perl -pe 's#\@abs_srcdir\@#$(PWD)#g' < $< > $@

expected/%.out: output/%.source
perl -pe 's#\@abs_srcdir\@#$(PWD)#g' < $< > $@

SQLFILES := sql/file.sql sql/import.sql sql/pgsql.sql sql/postgis.sql
OUTFILES := expected/file.out expected/import.out expected/pgsql.out expected/postgis.out

installcheck: $(SQLFILES) $(OUTFILES)

endif

###############################################################
# Build the utility program after PGXS to override the
# PGXS environment
Expand Down

0 comments on commit 8130dc9

Please sign in to comment.