source: trunk/regress/Makefile.in

Last change on this file was 14949, checked in by strk, 9 days ago

Add ST_Normalize function

Includes tests and documentation

Closes #1768

  • 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        normalize \
102        operators \
103        out_geometry \
104        out_geography \
105        polygonize \
106        polyhedralsurface \
107        postgis_type_name \
108        regress \
109        regress_bdpoly \
110        regress_index \
111        regress_index_nulls \
112        regress_management \
113        regress_selectivity \
114        regress_lrs \
115        regress_ogc \
116        regress_ogc_cover \
117        regress_ogc_prep \
118        regress_proj \
119        relate \
120        remove_repeated_points \
121        removepoint \
122        setpoint \
123        simplify \
124        simplifyvw \
125        size \
126        snaptogrid \
127        split \
128        sql-mm-serialize \
129        sql-mm-circularstring \
130        sql-mm-compoundcurve \
131        sql-mm-curvepoly \
132        sql-mm-general \
133        sql-mm-multicurve \
134        sql-mm-multisurface \
135        swapordinates \
136        summary \
137        temporal \
138        tickets \
139        twkb \
140        typmod \
141        wkb \
142        wkt \
143        wmsservers
144
145ifeq ($(shell expr $(POSTGIS_PGSQL_VERSION) ">=" 91),1)
146ifeq ($(shell expr $(POSTGIS_PGSQL_VERSION) "<"  95),1)
147        # Index supported KNN only available in PostgreSQL 9.1 and higher
148        # For 9.5 and higher, use the recheck suite instead
149        TESTS += knn
150endif
151endif
152
153ifeq ($(shell expr $(POSTGIS_PGSQL_VERSION) ">=" 95),1)
154        # Index supported KNN recheck only available in PostgreSQL 9.5 and higher
155        TESTS += knn_recheck \
156           temporal_knn
157endif
158
159ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 32),1)
160        # GEOS-3.3 adds:
161        # ST_HausdorffDistance, ST_Buffer(params)
162        TESTS += \
163                hausdorff \
164                regress_buffer_params
165endif
166
167ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 33),1)
168        # GEOS-3.3 adds:
169        # ST_RelateMatch, ST_IsValidDetail, ST_SharedPaths ,
170        # ST_Snap, ST_UnaryUnion, ST_MakeClean
171        TESTS += \
172                offsetcurve \
173                relatematch \
174                isvaliddetail \
175                sharedpaths \
176                snap \
177                node \
178                unaryunion \
179                clean \
180                relate_bnr
181endif
182
183ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 34),1)
184        # GEOS-3.4 adds:
185        # ST_DelaunayTriangles
186        TESTS += \
187                delaunaytriangles
188endif
189
190
191ifeq ($(INTERRUPTTESTS),yes)
192        # Allow CI servers to configure --with-interrupt-tests
193        TESTS += \
194        interrupt
195
196ifeq ($(shell expr $(GEOS_NUMERIC_VERSION) ">=" 30403),1)
197        TESTS += \
198                interrupt_relate
199endif
200
201ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 34),1)
202        # GEOS-3.4 adds:
203        # ST_DelaunayTriangles
204        TESTS += \
205                interrupt_buffer
206endif
207
208endif
209
210
211ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 35),1)
212        # GEOS-3.5 adds:
213        # ST_ClipByBox2d, ST_Subdivide, ST_Voronoi
214        TESTS += \
215                clipbybox2d \
216                subdivide \
217                voronoi
218endif
219
220ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 36),1)
221        # GEOS-3.6 adds:
222        # ST_MinimumClearance
223        TESTS += \
224                minimum_clearance
225endif
226
227ifeq ($(HAVE_JSON),yes)
228        # JSON-C adds:
229        # ST_GeomFromGeoJSON()
230        TESTS += \
231                in_geojson
232endif
233
234ifeq ($(HAVE_SFCGAL),yes)
235        # SFCGAL additionnal backend
236        TESTS += \
237                regress_sfcgal \
238                sfcgal/empty.sql \
239                sfcgal/geography.sql \
240                sfcgal/legacy.sql \
241                sfcgal/measures.sql \
242                sfcgal/regress_ogc_prep.sql \
243                sfcgal/regress_ogc.sql \
244                sfcgal/regress.sql \
245                sfcgal/tickets.sql \
246                sfcgal/concave_hull.sql \
247                sfcgal/wmsservers.sql \
248                sfcgal/approximatemedialaxis.sql
249
250        SFCGALTESTFLAGS = --sfcgal
251endif
252
253
254all install uninstall:
255
256distclean: clean
257        rm Makefile
258
259staged-install-topology:
260        @if test x"@TOPOLOGY@" != "x"; then \
261                $(MAKE) -C ../topology REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install; \
262        fi
263
264staged-install-raster:
265        @if test x"@RASTER@" != "x"; then \
266                $(MAKE) -C ../raster/rt_pg REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install; \
267        fi
268
269staged-install: staged-install-raster staged-install-topology
270        $(MAKE) -C ../postgis REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install
271        $(MAKE) -C ../ REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) comments-install
272        $(PERL) -pi.bak -e 's,\$$libdir,$(REGRESS_INSTALLDIR)/lib,g' $(REGRESS_INSTALLDIR)/share/contrib/postgis/*.sql
273        #$(MAKE) -C ../loader REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install
274
275test check: staged-install
276        $(PERL) run_test.pl $(RUNTESTFLAGS) $(SFCGALTESTFLAGS) $(TESTS) && \
277        $(PERL) run_test.pl --upgrade $(RUNTESTFLAGS) $(SFCGALTESTFLAGS) $(TESTS)
278
279garden:
280        createdb postgis_garden
281        createlang plpgsql postgis_garden || true #tolerate an error here
282        psql -d postgis_garden < $(REGRESS_INSTALLDIR)/share/contrib/postgis/postgis.sql && \
283        psql -d postgis_garden < $(REGRESS_INSTALLDIR)/share/contrib/postgis/spatial_ref_sys.sql || true # tolerate an error here
284        psql -d postgis_garden < $(REGRESS_INSTALLDIR)/share/contrib/postgis/rtpostgis.sql || true #tolerate an error here
285        @echo '-------------------------------------------------'
286        @echo 'Regression tests in progress (it will take time)'
287        @echo 'Result output: ./regress/postgis_garden_result.txt'
288        @echo '-------------------------------------------------'
289        psql -ad postgis_garden < ../doc/postgis_gardentest_${POSTGIS_MAJOR_VERSION}${POSTGIS_MINOR_VERSION}.sql > postgis_garden_result.txt 2>&1
290        psql -ad postgis_garden < ../doc/raster_gardentest_${POSTGIS_MAJOR_VERSION}${POSTGIS_MINOR_VERSION}.sql > raster_garden_result.txt 2>&1
291        #dropdb postgis_garden
292
293cleanup:
294        @sleep 1
295        @dropdb postgis_reg > /dev/null
296
297clean:
298        rm -rf $(REGRESS_INSTALLDIR)
299        rm -f postgis_garden_result.txt
Note: See TracBrowser for help on using the repository browser.