@@ -15,21 +15,29 @@ OBJS = connection.o option.o deparse.o sqlite_query.o sqlite_fdw.o sqlite_data_n
1515EXTENSION = sqlite_fdw
1616DATA = sqlite_fdw--1.0.sql sqlite_fdw--1.0--1.1.sql
1717
18+ # Use local downloaded and compiled SQLite library instead of system
19+ ifdef CI_ENV
20+ override PG_LDFLAGS += -L/usr/local/lib
21+ endif
22+
1823ifdef ENABLE_GIS
1924override PG_CFLAGS += -DSQLITE_FDW_GIS_ENABLE
20- GISTEST = postgis
25+ GISTEST = postgis
2126else
22- GISTEST = nogis
27+ GISTEST = nogis
2328endif
2429
30+ # Tests for PostgreSQL data types support
31+ TYPETESTS = types/bitstring types/bool types/float4 types/float8 types/int4 types/int8 types/json types/numeric types/$(GISTEST ) types/macaddr types/macaddr8 types/out_of_range types/timestamp types/uuid
32+
2533ifndef REGRESS
26- REGRESS = extra/sqlite_fdw_post types/bitstring types/bool types/float4 types/float8 types/int4 types/int8 types/numeric types/$(GISTEST ) types/macaddr types/macaddr8 types/out_of_range types/timestamp types/uuid extra/join extra/limit extra/aggregates extra/prepare extra/select_having extra/select extra/insert extra/update extra/encodings sqlite_fdw type_$(GISTEST ) aggregate selectfunc
34+ # System tests, full default sequence
35+ REGRESS = extra/sqlite_fdw_post $(TYPETESTS ) extra/join extra/limit extra/aggregates extra/prepare extra/select_having extra/select extra/insert extra/update extra/encodings sqlite_fdw type_$(GISTEST ) aggregate selectfunc
2736endif
2837
38+ # Other encodings also sre tested. Client encoding should be UTF-8-
2939REGRESS_OPTS = --encoding=utf8
3040
31- SQLITE_LIB = sqlite3
32-
3341UNAME = uname
3442OS := $(shell $(UNAME ) )
3543ifeq ($(OS ) , Darwin)
@@ -71,8 +79,17 @@ REGRESS := $(addprefix $(REGRESS_PREFIX_SUB)/,$(REGRESS))
7179$(shell mkdir -p results/$(REGRESS_PREFIX_SUB)/extra)
7280$(shell mkdir -p results/$(REGRESS_PREFIX_SUB)/types)
7381
82+ # $(info ENABLE_GIS is $(ENABLE_GIS))
83+ $(info CI_ENV is $(CI_ENV))
84+ # $(info SHLIB_LINK is $(SHLIB_LINK))
85+ # $(info LD_LIBRARY_PATH is $(LD_LIBRARY_PATH))
86+ $(info PG_CFLAGS is $(PG_CFLAGS))
87+ # $(info REGRESS is $(REGRESS))
88+ # $(info DLSUFFIX is $(DLSUFFIX))
89+
7490ifdef ENABLE_GIS
7591check : temp-install
7692temp-install : EXTRA_INSTALL+=contrib/postgis
7793checkprep : EXTRA_INSTALL+=contrib/postgis
7894endif
95+
0 commit comments