source: trunk/regress/Makefile.in

Last change on this file was 14856, checked in by dbaston, 5 weeks ago

#3424, ST_MinimumClearance

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