@@ -33,13 +33,10 @@ DATA_built = $(RELEASE_SQL) \
3333 pg_sphere--1.3.1--1.3.2.sql
3434
3535DOCS = README.pg_sphere COPYRIGHT.pg_sphere
36- REGRESS = init tables points euler circle line ellipse poly path box index\
37- contains_ops contains_ops_compat bounding_box_gist gnomo epochprop\
38- contains overlaps spoint_brin sbox_brin selectivity
39-
40- TESTS = init_test tables points euler circle line ellipse poly path box\
36+ TESTS = tables points euler circle line ellipse poly path box\
4137 index contains_ops contains_ops_compat bounding_box_gist gnomo\
4238 epochprop contains overlaps spoint_brin sbox_brin selectivity
39+ REGRESS = init$(TESTS )
4340
4441PG_CFLAGS += -DPGSPHERE_VERSION=$(PGSPHERE_VERSION )
4542PG_CPPFLAGS += -DPGSPHERE_VERSION=$(PGSPHERE_VERSION )
@@ -61,7 +58,6 @@ PGS_SQL = pgs_types.sql pgs_point.sql pgs_euler.sql pgs_circle.sql \
6158 pgs_gist.sql gnomo.sql pgs_brin.sql pgs_circle_sel.sql
6259
6360ifneq ($(USE_HEALPIX ) ,0)
64- REGRESS += healpix moc moc1 moc100 mocautocast
6561TESTS += healpix moc moc1 moc100 mocautocast
6662PGS_SQL += healpix.sql
6763endif
@@ -104,17 +100,17 @@ healpix_bare/healpix_bare.o : healpix_bare/healpix_bare.c
104100pg_version :=$(word 2,$(shell $(PG_CONFIG ) --version) )
105101has_support_functions =$(if $(filter-out 9.% 10.% 11.% ,$(pg_version ) ) ,y,n)
106102
107- crushtest :REGRESS +=$(CRUSH_TESTS )
103+ crushtest :TESTS +=$(CRUSH_TESTS )
108104crushtest : installcheck
109105
110106ifeq ($(has_support_functions ) ,y)
111107PGS_SQL += pgs_gist_support.sql
112- REGRESS += gist_support
113108TESTS += gist_support
114109endif
115110
111+ # "make test" uses a special initialization file that doesn't rely on "create extension"
116112test : pg_sphere.test.sql
117- $(pg_regress_installcheck ) --temp-instance=tmp_check$(REGRESS_OPTS ) $(TESTS )
113+ $(pg_regress_installcheck ) --temp-instance=tmp_check$(REGRESS_OPTS ) init_test $(TESTS )
118114
119115pg_sphere.test.sql :$(RELEASE_SQL ) $(shlib )
120116tail -n+3$< | sed' s,MODULE_PATHNAME,$(realpath $(shlib)),g' > $@