source: trunk/regress/Makefile.in

Last change on this file was 15028, checked in by robe, 2 months ago

Add support for BRIN indexes (2nd Quadrant, Giuseppe Broccolo, Julien Rouhaud)

Closes #3591
Closes https://github.com/postgis/postgis/pull/106

  • Property svn:eol-style set to native
File size: 7.3 KB
Line 
1# **********************************************************************
2# *
3# * PostGIS - Spatial Types for PostgreSQL
4# * http://postgis.net
5# *
6# * Copyright (C) 2011-2012 Sandro Santilli <strk@kbt.io>
7# * Copyright (C) 2009-2011 Paul Ramsey <pramsey@cleverelephant.ca>
8# * Copyright (C) 2008-2009 Mark Cave-Ayland
9# *
10# * This is free software; you can redistribute and/or modify it under
11# * the terms of the GNU General Public Licence. See the COPYING file.
12# *
13# **********************************************************************
14
15PERL=@PERL@
16TMPDIR?=/tmp
17
18POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@
19POSTGIS_GEOS_VERSION=@POSTGIS_GEOS_VERSION@
20GEOS_NUMERIC_VERSION=@GEOS_NUMERIC_VERSION@
21POSTGIS_PROJ_VERSION=@POSTGIS_PROJ_VERSION@
22POSTGIS_MAJOR_VERSION=@POSTGIS_MAJOR_VERSION@
23POSTGIS_MINOR_VERSION=@POSTGIS_MINOR_VERSION@
24HAVE_JSON=@HAVE_JSON@
25HAVE_SFCGAL=@HAVE_SFCGAL@
26HAVE_BRIN=@HAVE_BRIN@
27MINGWBUILD=@MINGWBUILD@
28INTERRUPTTESTS=@INTERRUPTTESTS@
29
30# MingW hack: rather than use PGSQL_BINDIR directly, we change
31# to the directory and then use "pwd" to return the path. This
32# ensures that the returned path is in MSYS format, otherwise
33# colons in drive letters will break PATH.
34PGSQL_BINDIR=$(shell cd "@PGSQL_BINDIR@" && pwd)
35
36# Where we put our regression installation
37ifeq ($(MINGWBUILD),1)
38        srcdir=$(shell bash -c "pwd -W")
39else
40        srcdir=$(shell pwd)
41endif
42REGRESS_INSTALLDIR=$(srcdir)/00-regress-install
43
44#
45# Put path from pg_config into front of search path
46#
47PATH := $(PGSQL_BINDIR):$(PATH)
48export PATH
49
50
51TESTS = \
52        loader/Point \
53        loader/PointM \
54        loader/PointZ \
55        loader/MultiPoint \
56        loader/MultiPointM \
57        loader/MultiPointZ \
58        loader/Arc \
59        loader/ArcM \
60        loader/ArcZ \
61        loader/Polygon \
62        loader/PolygonM \
63        loader/PolygonZ \
64        loader/TSTPolygon \
65        loader/TSIPolygon \
66        loader/TSTIPolygon \
67        loader/PointWithSchema \
68        loader/NoTransPoint \
69        loader/NotReallyMultiPoint \
70        loader/MultiToSinglePoint \
71        loader/ReprojectPts \
72        loader/ReprojectPtsGeog \
73        loader/Latin1 \
74        loader/Latin1-implicit \
75        loader/mfile \
76        dumper/literalsrid \
77        dumper/realtable \
78        affine \
79        bestsrid \
80        binary \
81        boundary \
82        cluster \
83        concave_hull\
84        ctors \
85        dump \
86        dumppoints \
87        empty \
88        estimatedextent \
89        forcecurve \
90        geography \
91        geometric_median \
92        in_geohash \
93        in_gml \
94        in_kml \
95        in_encodedpolyline \
96        iscollection \
97        legacy \
98        long_xact \
99        lwgeom_regress \
100        measures \
101        minimum_bounding_circle \
102        normalize \
103        operators \
104        out_geometry \
105        out_geography \
106        polygonize \
107        polyhedralsurface \
108        postgis_type_name \
109        regress \
110        regress_bdpoly \
111        regress_index \
112        regress_index_nulls \
113        regress_management \
114        regress_selectivity \
115        regress_lrs \
116        regress_ogc \
117        regress_ogc_cover \
118        regress_ogc_prep \
119        regress_proj \
120        relate \
121        remove_repeated_points \
122        removepoint \
123        setpoint \
124        simplify \
125        simplifyvw \
126        size \
127        snaptogrid \
128        split \
129        sql-mm-serialize \
130        sql-mm-circularstring \
131        sql-mm-compoundcurve \
132        sql-mm-curvepoly \
133        sql-mm-general \
134        sql-mm-multicurve \
135        sql-mm-multisurface \
136        swapordinates \
137        summary \
138        temporal \
139        tickets \
140        twkb \
141        typmod \
142        wkb \
143        wkt \
144        wmsservers
145
146ifeq ($(shell expr $(POSTGIS_PGSQL_VERSION) ">=" 91),1)
147ifeq ($(shell expr $(POSTGIS_PGSQL_VERSION) "<"  95),1)
148        # Index supported KNN only available in PostgreSQL 9.1 and higher
149        # For 9.5 and higher, use the recheck suite instead
150        TESTS += knn
151endif
152endif
153
154ifeq ($(shell expr $(POSTGIS_PGSQL_VERSION) ">=" 95),1)
155        # Index supported KNN recheck only available in PostgreSQL 9.5 and higher
156        TESTS += knn_recheck \
157           temporal_knn
158endif
159
160ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 32),1)
161        # GEOS-3.3 adds:
162        # ST_HausdorffDistance, ST_Buffer(params)
163        TESTS += \
164                hausdorff \
165                regress_buffer_params
166endif
167
168ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 33),1)
169        # GEOS-3.3 adds:
170        # ST_RelateMatch, ST_IsValidDetail, ST_SharedPaths ,
171        # ST_Snap, ST_UnaryUnion, ST_MakeClean
172        TESTS += \
173                offsetcurve \
174                relatematch \
175                isvaliddetail \
176                sharedpaths \
177                snap \
178                node \
179                unaryunion \
180                clean \
181                relate_bnr
182endif
183
184ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 34),1)
185        # GEOS-3.4 adds:
186        # ST_DelaunayTriangles
187        TESTS += \
188                delaunaytriangles
189endif
190
191
192ifeq ($(INTERRUPTTESTS),yes)
193        # Allow CI servers to configure --with-interrupt-tests
194        TESTS += \
195        interrupt
196
197ifeq ($(shell expr $(GEOS_NUMERIC_VERSION) ">=" 30403),1)
198        TESTS += \
199                interrupt_relate
200endif
201
202ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 34),1)
203        # GEOS-3.4 adds:
204        # ST_DelaunayTriangles
205        TESTS += \
206                interrupt_buffer
207endif
208
209endif
210
211
212ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 35),1)
213        # GEOS-3.5 adds:
214        # ST_ClipByBox2d, ST_Subdivide, ST_Voronoi
215        TESTS += \
216                clipbybox2d \
217                subdivide \
218                voronoi
219endif
220
221ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 36),1)
222        # GEOS-3.6 adds:
223        # ST_MinimumClearance
224        TESTS += \
225                minimum_clearance
226endif
227
228ifeq ($(HAVE_JSON),yes)
229        # JSON-C adds:
230        # ST_GeomFromGeoJSON()
231        TESTS += \
232                in_geojson
233endif
234
235ifeq ($(HAVE_BRIN),yes)
236        TESTS += \
237                regress_brin_index \
238                regress_brin_index_3d \
239                regress_brin_index_geography
240endif
241
242ifeq ($(HAVE_SFCGAL),yes)
243        # SFCGAL additionnal backend
244        TESTS += \
245                regress_sfcgal \
246                sfcgal/empty.sql \
247                sfcgal/geography.sql \
248                sfcgal/legacy.sql \
249                sfcgal/measures.sql \
250                sfcgal/regress_ogc_prep.sql \
251                sfcgal/regress_ogc.sql \
252                sfcgal/regress.sql \
253                sfcgal/tickets.sql \
254                sfcgal/concave_hull.sql \
255                sfcgal/wmsservers.sql \
256                sfcgal/approximatemedialaxis.sql
257
258        SFCGALTESTFLAGS = --sfcgal
259endif
260
261
262all install uninstall:
263
264distclean: clean
265        rm Makefile
266
267staged-install-topology:
268        @if test x"@TOPOLOGY@" != "x"; then \
269                $(MAKE) -C ../topology REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install; \
270        fi
271
272staged-install-raster:
273        @if test x"@RASTER@" != "x"; then \
274                $(MAKE) -C ../raster/rt_pg REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install; \
275        fi
276
277staged-install: staged-install-raster staged-install-topology
278        $(MAKE) -C ../postgis REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install
279        $(MAKE) -C ../ REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) comments-install
280        $(PERL) -pi.bak -e 's,\$$libdir,$(REGRESS_INSTALLDIR)/lib,g' $(REGRESS_INSTALLDIR)/share/contrib/postgis/*.sql
281        #$(MAKE) -C ../loader REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install
282
283test check: staged-install
284        $(PERL) run_test.pl $(RUNTESTFLAGS) $(SFCGALTESTFLAGS) $(TESTS) && \
285        $(PERL) run_test.pl --upgrade $(RUNTESTFLAGS) $(SFCGALTESTFLAGS) $(TESTS)
286
287garden:
288        createdb postgis_garden
289        createlang plpgsql postgis_garden || true #tolerate an error here
290        psql -d postgis_garden < $(REGRESS_INSTALLDIR)/share/contrib/postgis/postgis.sql && \
291        psql -d postgis_garden < $(REGRESS_INSTALLDIR)/share/contrib/postgis/spatial_ref_sys.sql || true # tolerate an error here
292        psql -d postgis_garden < $(REGRESS_INSTALLDIR)/share/contrib/postgis/rtpostgis.sql || true #tolerate an error here
293        @echo '-------------------------------------------------'
294        @echo 'Regression tests in progress (it will take time)'
295        @echo 'Result output: ./regress/postgis_garden_result.txt'
296        @echo '-------------------------------------------------'
297        psql -ad postgis_garden < ../doc/postgis_gardentest_${POSTGIS_MAJOR_VERSION}${POSTGIS_MINOR_VERSION}.sql > postgis_garden_result.txt 2>&1
298        psql -ad postgis_garden < ../doc/raster_gardentest_${POSTGIS_MAJOR_VERSION}${POSTGIS_MINOR_VERSION}.sql > raster_garden_result.txt 2>&1
299        #dropdb postgis_garden
300
301cleanup:
302        @sleep 1
303        @dropdb postgis_reg > /dev/null
304
305clean:
306        rm -rf $(REGRESS_INSTALLDIR)
307        rm -f postgis_garden_result.txt
Note: See TracBrowser for help on using the repository browser.