[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha2-109-g8d3cf31

git at osgeo.org git at osgeo.org
Wed Oct 28 17:04:32 PDT 2020


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  8d3cf31a3a13c0ce2e4d5025389d6a023dd63848 (commit)
      from  ac0351817888d8f45911de1b60c21a461acf9507 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8d3cf31a3a13c0ce2e4d5025389d6a023dd63848
Author: Sandro Santilli <strk at kbt.io>
Date:   Wed Oct 28 19:16:14 2020 +0100

    Refactor autotools configuration for regression tests
    
    - Runs sfcgal tests in the same db with core tests
    - Allow running loader/dumper tests in isolation
    
    Closes #4207

diff --git a/.gitignore b/.gitignore
index 5405e32..e48169d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -148,6 +148,9 @@ raster/test/regress/loader/TiledAutoSkipNoData.tif
 regress/00-regress-install/
 regress/Makefile
 regress/core/Makefile
+regress/core/tests.mk
+regress/dumper/Makefile
+regress/loader/Makefile
 regress/sfcgal/Makefile
 regress/postgis.sql
 regress/postgis_garden_result.txt
diff --git a/configure.ac b/configure.ac
index 4c7d412..587d3a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1595,6 +1595,9 @@ AC_OUTPUT([GNUmakefile
    topology/test/Makefile
    regress/Makefile
    regress/core/Makefile
+   regress/core/tests.mk
+   regress/dumper/Makefile
+   regress/loader/Makefile
    regress/sfcgal/Makefile
    doc/Makefile
    doc/Makefile.comments
diff --git a/regress/Makefile.in b/regress/Makefile.in
index 7fe9bae..66d53df 100644
--- a/regress/Makefile.in
+++ b/regress/Makefile.in
@@ -18,6 +18,8 @@ POSTGIS_MAJOR_VERSION=@POSTGIS_MAJOR_VERSION@
 POSTGIS_MINOR_VERSION=@POSTGIS_MINOR_VERSION@
 POSTGIS_MICRO_VERSION=@POSTGIS_MICRO_VERSION@
 
+topsrcdir = $(realpath ../)
+
 # Where we put our regression installation
 ifeq ($(MINGWBUILD),1)
 	srcdir=$(shell bash -c "pwd -W")
@@ -39,26 +41,31 @@ export PATH
 
 all install uninstall:
 
-check: check-regress
+check-regress: staged-install
+check-regress: check
 
 check-unit:
 
-check-regress: staged-install
-	$(MAKE) -C core check
+include core/tests.mk
+include loader/tests.mk
+include dumper/tests.mk
 ifeq ($(HAVE_SFCGAL),yes)
-	$(MAKE) -C sfcgal check
+	override RUNTESTFLAGS := $(RUNTESTFLAGS) --sfcgal
+	include sfcgal/tests.mk
 endif
 
+include runtest.mk
+
 clean:
-	$(MAKE) -C core $@
-	$(MAKE) -C sfcgal $@
 	rm -rf $(REGRESS_INSTALLDIR)
 	rm -f postgis_garden_result.txt
 
 distclean: clean
-	$(MAKE) -C core $@
-	$(MAKE) -C sfcgal $@
 	rm -f Makefile
+	rm -f core/Makefile
+	rm -f loader/Makefile
+	rm -f dumper/Makefile
+	rm -f sfcgal/Makefile
 
 staged-install-sfcgal:
 	@if test x"@SFCGAL@" != "x"; then \
diff --git a/regress/core/Makefile.in b/regress/core/Makefile.in
index fd9529f..5d24128 100644
--- a/regress/core/Makefile.in
+++ b/regress/core/Makefile.in
@@ -3,9 +3,7 @@
 # * PostGIS - Spatial Types for PostgreSQL
 # * http://postgis.net
 # *
-# * Copyright (C) 2011-2012 Sandro Santilli <strk at kbt.io>
-# * Copyright (C) 2009-2011 Paul Ramsey <pramsey at cleverelephant.ca>
-# * Copyright (C) 2008-2009 Mark Cave-Ayland
+# * Copyright (C) 2020 Sandro Santilli <strk at kbt.io>
 # *
 # * This is free software; you can redistribute and/or modify it under
 # * the terms of the GNU General Public Licence. See the COPYING file.
@@ -13,238 +11,8 @@
 # **********************************************************************
 
 PERL=@PERL@
-TMPDIR?=/tmp
 
-POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@
-POSTGIS_GEOS_VERSION=@POSTGIS_GEOS_VERSION@
-GEOS_NUMERIC_VERSION=@GEOS_NUMERIC_VERSION@
-POSTGIS_PROJ_VERSION=@POSTGIS_PROJ_VERSION@
-POSTGIS_MAJOR_VERSION=@POSTGIS_MAJOR_VERSION@
-POSTGIS_MINOR_VERSION=@POSTGIS_MINOR_VERSION@
-HAVE_JSON=@HAVE_JSON@
-PROTOC_VERSION=@PROTOC_VERSION@
-HAVE_SPGIST=@HAVE_SPGIST@
-INTERRUPTTESTS=@INTERRUPTTESTS@
+topsrcdir = $(realpath ../../)
 
-# MingW hack: rather than use PGSQL_BINDIR directly, we change
-# to the directory and then use "pwd" to return the path. This
-# ensures that the returned path is in MSYS format, otherwise
-# colons in drive letters will break PATH.
-PGSQL_BINDIR=$(shell cd "@PGSQL_BINDIR@" && pwd)
-
-
-#
-# Put path from pg_config into front of search path
-#
-PATH := $(PGSQL_BINDIR):$(PATH)
-export PATH
-
-
-TESTS = \
-	../loader/Point \
-	../loader/PointM \
-	../loader/PointZ \
-	../loader/MultiPoint \
-	../loader/MultiPointM \
-	../loader/MultiPointZ \
-	../loader/Arc \
-	../loader/ArcM \
-	../loader/ArcZ \
-	../loader/Polygon \
-	../loader/PolygonM \
-	../loader/PolygonZ \
-	../loader/TSTPolygon \
-	../loader/TSIPolygon \
-	../loader/TSTIPolygon \
-	../loader/PointWithSchema \
-	../loader/NoTransPoint \
-	../loader/NotReallyMultiPoint \
-	../loader/MultiToSinglePoint \
-	../loader/ReprojectPts \
-	../loader/ReprojectPtsD \
-	../loader/ReprojectPtsGeog \
-	../loader/ReprojectPtsGeogD \
-	../loader/Latin1 \
-	../loader/Latin1-implicit \
-	../loader/mfile \
-	../dumper/mfiledmp \
-	../dumper/literalsrid \
-	../dumper/realtable \
-	../dumper/nullsintable \
-	../dumper/null3d \
-	affine \
-	bestsrid \
-	binary \
-	boundary \
-	chaikin \
-	filterm \
-	cluster \
-	concave_hull\
-	ctors \
-	curvetoline \
-	dump \
-	dumppoints \
-	empty \
-	estimatedextent \
-	forcecurve \
-	geography \
-	geometric_median \
-	hausdorff \
-	in_geohash \
-	in_gml \
-	in_kml \
-	in_encodedpolyline \
-	iscollection \
-	legacy \
-	long_xact \
-	lwgeom_regress \
-	measures \
-	minimum_bounding_circle \
-	normalize \
-	operators \
-	orientation \
-	out_geometry \
-	out_geography \
-	polygonize \
-	polyhedralsurface \
-	postgis_type_name \
-	quantize_coordinates \
-	regress \
-	regress_bdpoly \
-	regress_buffer_params \
-	regress_gist_index_nd \
-	regress_index \
-	regress_index_nulls \
-	regress_management \
-	regress_selectivity \
-	regress_lrs \
-	regress_ogc \
-	regress_ogc_cover \
-	regress_ogc_prep \
-	regress_proj \
-	relate \
-	remove_repeated_points \
-	removepoint \
-	reverse \
-	setpoint \
-	simplify \
-	simplifyvw \
-	size \
-	snaptogrid \
-	split \
-	sql-mm-serialize \
-	sql-mm-circularstring \
-	sql-mm-compoundcurve \
-	sql-mm-curvepoly \
-	sql-mm-general \
-	sql-mm-multicurve \
-	sql-mm-multisurface \
-	swapordinates \
-	summary \
-	temporal \
-	temporal_knn \
-	tickets \
-	twkb \
-	typmod \
-	wkb \
-	wkt \
-	wmsservers \
-	offsetcurve \
-	relatematch \
-	isvaliddetail \
-	sharedpaths \
-	snap \
-	node \
-	unaryunion \
-	clean \
-	relate_bnr \
-	delaunaytriangles \
-	clipbybox2d \
-	subdivide \
-	voronoi \
-	regress_brin_index \
-	regress_brin_index_3d \
-	regress_brin_index_geography \
-	minimum_clearance \
-	oriented_envelope \
-	point_coordinates \
-	out_geojson
-
-# Slow slow tests
-TESTS_SLOW = \
-	concave_hull_hard \
-	knn_recheck
-
-ifeq ($(shell expr "$(POSTGIS_PGSQL_VERSION)" ">=" 120),1)
-	TESTS += \
-		computed_columns
-endif
-
-ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 37),1)
-	# GEOS-3.7 adds:
-	# ST_FrechetDistance
-	TESTS += \
-		frechet
-endif
-
-ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 38),1)
-	# GEOS-3.8 adds stable pointonsurface implementation
-	TESTS += \
-		geos38
-endif
-
-ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 39),1)
-	# GEOS-3.0 adds stable maximuminscribedcircle implementation
-	TESTS += \
-		geos39 \
-		fixedoverlay
-endif
-
-ifeq ($(INTERRUPTTESTS),yes)
-	# Allow CI servers to configure --with-interrupt-tests
-	TESTS += \
-		interrupt \
-		interrupt_relate \
-		interrupt_buffer
-endif
-
-ifeq ($(HAVE_JSON),yes)
-	# JSON-C adds:
-	# ST_GeomFromGeoJSON()
-	TESTS += \
-		in_geojson
-endif
-
-ifeq ($(HAVE_SPGIST),yes)
-	TESTS += \
-	regress_spgist_index_2d \
-	regress_spgist_index_3d \
-	regress_spgist_index_nd
-endif
-
-ifeq (@HAVE_PROTOBUF@,yes)
-	# protobuf-c adds:
-	# ST_AsMVT, ST_AsGeobuf
-	TESTS += \
-		mvt \
-		mvt_jsonb \
-		geobuf
-endif
-
-all install uninstall:
-
-distclean: clean
-	rm Makefile
-
-test check:
-	$(PERL) ../run_test.pl $(RUNTESTFLAGS) $(TESTS)
-	# only run upgrade test if RUNTESTFLAGS was not already doing that
-	if echo "$(RUNTESTFLAGS)" | grep -vq -- --upgrade; then \
-		$(PERL) ../run_test.pl --upgrade $(RUNTESTFLAGS) $(TESTS); \
-	fi
-
-check-long:
-	$(PERL) ../run_test.pl $(RUNTESTFLAGS) $(TESTS) $(TESTS_SLOW)
-
-
-clean:
+include tests.mk
+include ../runtest.mk
diff --git a/regress/core/regress.sql b/regress/core/regress.sql
index bb21b97..4babc22 100644
--- a/regress/core/regress.sql
+++ b/regress/core/regress.sql
@@ -333,9 +333,12 @@ DROP table test;
 SELECT DISTINCT 'unexpected probin', proname || ':' || probin
 FROM pg_proc
 WHERE probin like '%postgis%'
-   AND regexp_replace(probin, '(rt)?postgis(_[^-]*)?', '') !=
+  AND
+regexp_replace(probin, '(rt)?postgis(_[^-]*)?(-[0-9.])$', '\3')
+	!=
 (
-SELECT regexp_replace(probin, '(rt)?postgis(_[^-]*)?', '')
+	SELECT
+regexp_replace(probin, '(rt)?postgis(_[^-]*)?(-[0-9.])$', '\3')
 	FROM pg_proc WHERE proname = 'postgis_lib_version'
 )
 ORDER BY 2;
diff --git a/regress/core/tests.mk.in b/regress/core/tests.mk.in
new file mode 100644
index 0000000..db0e5c2
--- /dev/null
+++ b/regress/core/tests.mk.in
@@ -0,0 +1,181 @@
+# **********************************************************************
+# *
+# * PostGIS - Spatial Types for PostgreSQL
+# * http://postgis.net
+# *
+# * Copyright (C) 2011-2020 Sandro Santilli <strk at kbt.io>
+# * Copyright (C) 2009-2011 Paul Ramsey <pramsey at cleverelephant.ca>
+# * Copyright (C) 2008-2009 Mark Cave-Ayland
+# *
+# * This is free software; you can redistribute and/or modify it under
+# * the terms of the GNU General Public Licence. See the COPYING file.
+# *
+# **********************************************************************
+
+POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@
+POSTGIS_GEOS_VERSION=@POSTGIS_GEOS_VERSION@
+HAVE_JSON=@HAVE_JSON@
+HAVE_SPGIST=@HAVE_SPGIST@
+INTERRUPTTESTS=@INTERRUPTTESTS@
+
+current_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
+
+TESTS += \
+	$(topsrcdir)/regress/core/affine \
+	$(topsrcdir)/regress/core/bestsrid \
+	$(topsrcdir)/regress/core/binary \
+	$(topsrcdir)/regress/core/boundary \
+	$(topsrcdir)/regress/core/chaikin \
+	$(topsrcdir)/regress/core/filterm \
+	$(topsrcdir)/regress/core/cluster \
+	$(topsrcdir)/regress/core/concave_hull\
+	$(topsrcdir)/regress/core/ctors \
+	$(topsrcdir)/regress/core/curvetoline \
+	$(topsrcdir)/regress/core/dump \
+	$(topsrcdir)/regress/core/dumppoints \
+	$(topsrcdir)/regress/core/empty \
+	$(topsrcdir)/regress/core/estimatedextent \
+	$(topsrcdir)/regress/core/forcecurve \
+	$(topsrcdir)/regress/core/geography \
+	$(topsrcdir)/regress/core/geometric_median \
+	$(topsrcdir)/regress/core/hausdorff \
+	$(topsrcdir)/regress/core/in_geohash \
+	$(topsrcdir)/regress/core/in_gml \
+	$(topsrcdir)/regress/core/in_kml \
+	$(topsrcdir)/regress/core/in_encodedpolyline \
+	$(topsrcdir)/regress/core/iscollection \
+	$(topsrcdir)/regress/core/legacy \
+	$(topsrcdir)/regress/core/long_xact \
+	$(topsrcdir)/regress/core/lwgeom_regress \
+	$(topsrcdir)/regress/core/measures \
+	$(topsrcdir)/regress/core/minimum_bounding_circle \
+	$(topsrcdir)/regress/core/normalize \
+	$(topsrcdir)/regress/core/operators \
+	$(topsrcdir)/regress/core/orientation \
+	$(topsrcdir)/regress/core/out_geometry \
+	$(topsrcdir)/regress/core/out_geography \
+	$(topsrcdir)/regress/core/polygonize \
+	$(topsrcdir)/regress/core/polyhedralsurface \
+	$(topsrcdir)/regress/core/postgis_type_name \
+	$(topsrcdir)/regress/core/quantize_coordinates \
+	$(topsrcdir)/regress/core/regress \
+	$(topsrcdir)/regress/core/regress_bdpoly \
+	$(topsrcdir)/regress/core/regress_buffer_params \
+	$(topsrcdir)/regress/core/regress_gist_index_nd \
+	$(topsrcdir)/regress/core/regress_index \
+	$(topsrcdir)/regress/core/regress_index_nulls \
+	$(topsrcdir)/regress/core/regress_management \
+	$(topsrcdir)/regress/core/regress_selectivity \
+	$(topsrcdir)/regress/core/regress_lrs \
+	$(topsrcdir)/regress/core/regress_ogc \
+	$(topsrcdir)/regress/core/regress_ogc_cover \
+	$(topsrcdir)/regress/core/regress_ogc_prep \
+	$(topsrcdir)/regress/core/regress_proj \
+	$(topsrcdir)/regress/core/relate \
+	$(topsrcdir)/regress/core/remove_repeated_points \
+	$(topsrcdir)/regress/core/removepoint \
+	$(topsrcdir)/regress/core/reverse \
+	$(topsrcdir)/regress/core/setpoint \
+	$(topsrcdir)/regress/core/simplify \
+	$(topsrcdir)/regress/core/simplifyvw \
+	$(topsrcdir)/regress/core/size \
+	$(topsrcdir)/regress/core/snaptogrid \
+	$(topsrcdir)/regress/core/split \
+	$(topsrcdir)/regress/core/sql-mm-serialize \
+	$(topsrcdir)/regress/core/sql-mm-circularstring \
+	$(topsrcdir)/regress/core/sql-mm-compoundcurve \
+	$(topsrcdir)/regress/core/sql-mm-curvepoly \
+	$(topsrcdir)/regress/core/sql-mm-general \
+	$(topsrcdir)/regress/core/sql-mm-multicurve \
+	$(topsrcdir)/regress/core/sql-mm-multisurface \
+	$(topsrcdir)/regress/core/swapordinates \
+	$(topsrcdir)/regress/core/summary \
+	$(topsrcdir)/regress/core/temporal \
+	$(topsrcdir)/regress/core/temporal_knn \
+	$(topsrcdir)/regress/core/tickets \
+	$(topsrcdir)/regress/core/twkb \
+	$(topsrcdir)/regress/core/typmod \
+	$(topsrcdir)/regress/core/wkb \
+	$(topsrcdir)/regress/core/wkt \
+	$(topsrcdir)/regress/core/wmsservers \
+	$(topsrcdir)/regress/core/offsetcurve \
+	$(topsrcdir)/regress/core/relatematch \
+	$(topsrcdir)/regress/core/isvaliddetail \
+	$(topsrcdir)/regress/core/sharedpaths \
+	$(topsrcdir)/regress/core/snap \
+	$(topsrcdir)/regress/core/node \
+	$(topsrcdir)/regress/core/unaryunion \
+	$(topsrcdir)/regress/core/clean \
+	$(topsrcdir)/regress/core/relate_bnr \
+	$(topsrcdir)/regress/core/delaunaytriangles \
+	$(topsrcdir)/regress/core/clipbybox2d \
+	$(topsrcdir)/regress/core/subdivide \
+	$(topsrcdir)/regress/core/voronoi \
+	$(topsrcdir)/regress/core/regress_brin_index \
+	$(topsrcdir)/regress/core/regress_brin_index_3d \
+	$(topsrcdir)/regress/core/regress_brin_index_geography \
+	$(topsrcdir)/regress/core/minimum_clearance \
+	$(topsrcdir)/regress/core/oriented_envelope \
+	$(topsrcdir)/regress/core/point_coordinates \
+	$(topsrcdir)/regress/core/out_geojson
+
+# Slow slow tests
+TESTS_SLOW = \
+	$(topsrcdir)/regress/core/concave_hull_hard \
+	$(topsrcdir)/regress/core/knn_recheck
+
+ifeq ($(shell expr "$(POSTGIS_PGSQL_VERSION)" ">=" 120),1)
+	TESTS += \
+		$(topsrcdir)/regress/core/computed_columns
+endif
+
+ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 37),1)
+	# GEOS-3.7 adds:
+	# ST_FrechetDistance
+	TESTS += \
+		$(topsrcdir)/regress/core/frechet
+endif
+
+ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 38),1)
+	# GEOS-3.8 adds stable pointonsurface implementation
+	TESTS += \
+		$(topsrcdir)/regress/core/geos38
+endif
+
+ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 39),1)
+	# GEOS-3.0 adds stable maximuminscribedcircle implementation
+	TESTS += \
+		$(topsrcdir)/regress/core/geos39 \
+		$(topsrcdir)/regress/core/fixedoverlay
+endif
+
+ifeq ($(INTERRUPTTESTS),yes)
+	# Allow CI servers to configure --with-interrupt-tests
+	TESTS += \
+		$(topsrcdir)/regress/core/interrupt \
+		$(topsrcdir)/regress/core/interrupt_relate \
+		$(topsrcdir)/regress/core/interrupt_buffer
+endif
+
+ifeq ($(HAVE_JSON),yes)
+	# JSON-C adds:
+	# ST_GeomFromGeoJSON()
+	TESTS += \
+		$(topsrcdir)/regress/core/in_geojson
+endif
+
+ifeq ($(HAVE_SPGIST),yes)
+	TESTS += \
+	$(topsrcdir)/regress/core/regress_spgist_index_2d \
+	$(topsrcdir)/regress/core/regress_spgist_index_3d \
+	$(topsrcdir)/regress/core/regress_spgist_index_nd
+endif
+
+ifeq (@HAVE_PROTOBUF@,yes)
+	# protobuf-c adds:
+	# ST_AsMVT, ST_AsGeobuf
+	TESTS += \
+		$(topsrcdir)/regress/core/mvt \
+		$(topsrcdir)/regress/core/mvt_jsonb \
+		$(topsrcdir)/regress/core/geobuf
+endif
diff --git a/regress/dumper/Makefile.in b/regress/dumper/Makefile.in
new file mode 100644
index 0000000..5d24128
--- /dev/null
+++ b/regress/dumper/Makefile.in
@@ -0,0 +1,18 @@
+# **********************************************************************
+# *
+# * PostGIS - Spatial Types for PostgreSQL
+# * http://postgis.net
+# *
+# * Copyright (C) 2020 Sandro Santilli <strk at kbt.io>
+# *
+# * This is free software; you can redistribute and/or modify it under
+# * the terms of the GNU General Public Licence. See the COPYING file.
+# *
+# **********************************************************************
+
+PERL=@PERL@
+
+topsrcdir = $(realpath ../../)
+
+include tests.mk
+include ../runtest.mk
diff --git a/regress/dumper/tests.mk b/regress/dumper/tests.mk
new file mode 100644
index 0000000..cbc49dd
--- /dev/null
+++ b/regress/dumper/tests.mk
@@ -0,0 +1,18 @@
+# **********************************************************************
+# *
+# * PostGIS - Spatial Types for PostgreSQL
+# * http://postgis.net
+# *
+# * Copyright (C) 2020 Sandro Santilli <strk at kbt.io>
+# *
+# * This is free software; you can redistribute and/or modify it under
+# * the terms of the GNU General Public Licence. See the COPYING file.
+# *
+# **********************************************************************
+
+TESTS += \
+	$(topsrcdir)/regress/dumper/mfiledmp \
+	$(topsrcdir)/regress/dumper/literalsrid \
+	$(topsrcdir)/regress/dumper/realtable \
+	$(topsrcdir)/regress/dumper/nullsintable \
+	$(topsrcdir)/regress/dumper/null3d
diff --git a/regress/loader/Makefile.in b/regress/loader/Makefile.in
new file mode 100644
index 0000000..26244d7
--- /dev/null
+++ b/regress/loader/Makefile.in
@@ -0,0 +1,19 @@
+# **********************************************************************
+# *
+# * PostGIS - Spatial Types for PostgreSQL
+# * http://postgis.net
+# *
+# * Copyright (C) 2020 Sandro Santilli <strk at kbt.io>
+# *
+# * This is free software; you can redistribute and/or modify it under
+# * the terms of the GNU General Public Licence. See the COPYING file.
+# *
+# **********************************************************************
+
+PERL=@PERL@
+
+topsrcdir = $(realpath ../../)
+
+include tests.mk
+
+include ../runtest.mk
diff --git a/regress/loader/tests.mk b/regress/loader/tests.mk
new file mode 100644
index 0000000..85031b7
--- /dev/null
+++ b/regress/loader/tests.mk
@@ -0,0 +1,40 @@
+# **********************************************************************
+# *
+# * PostGIS - Spatial Types for PostgreSQL
+# * http://postgis.net
+# *
+# * Copyright (C) 2020 Sandro Santilli <strk at kbt.io>
+# *
+# * This is free software; you can redistribute and/or modify it under
+# * the terms of the GNU General Public Licence. See the COPYING file.
+# *
+# **********************************************************************
+
+
+TESTS += \
+	$(topsrcdir)/regress/loader/Point \
+	$(topsrcdir)/regress/loader/PointM \
+	$(topsrcdir)/regress/loader/PointZ \
+	$(topsrcdir)/regress/loader/MultiPoint \
+	$(topsrcdir)/regress/loader/MultiPointM \
+	$(topsrcdir)/regress/loader/MultiPointZ \
+	$(topsrcdir)/regress/loader/Arc \
+	$(topsrcdir)/regress/loader/ArcM \
+	$(topsrcdir)/regress/loader/ArcZ \
+	$(topsrcdir)/regress/loader/Polygon \
+	$(topsrcdir)/regress/loader/PolygonM \
+	$(topsrcdir)/regress/loader/PolygonZ \
+	$(topsrcdir)/regress/loader/TSTPolygon \
+	$(topsrcdir)/regress/loader/TSIPolygon \
+	$(topsrcdir)/regress/loader/TSTIPolygon \
+	$(topsrcdir)/regress/loader/PointWithSchema \
+	$(topsrcdir)/regress/loader/NoTransPoint \
+	$(topsrcdir)/regress/loader/NotReallyMultiPoint \
+	$(topsrcdir)/regress/loader/MultiToSinglePoint \
+	$(topsrcdir)/regress/loader/ReprojectPts \
+	$(topsrcdir)/regress/loader/ReprojectPtsD \
+	$(topsrcdir)/regress/loader/ReprojectPtsGeog \
+	$(topsrcdir)/regress/loader/ReprojectPtsGeogD \
+	$(topsrcdir)/regress/loader/Latin1 \
+	$(topsrcdir)/regress/loader/Latin1-implicit \
+	$(topsrcdir)/regress/loader/mfile
diff --git a/regress/runtest.mk b/regress/runtest.mk
new file mode 100644
index 0000000..90a4764
--- /dev/null
+++ b/regress/runtest.mk
@@ -0,0 +1,18 @@
+abstopsrcdir := $(realpath $(topsrcdir))
+abssrcdir := $(realpath .)
+
+TESTS := $(patsubst $(topsrcdir)/%,$(abstopsrcdir)/%,$(TESTS))
+TESTS := $(patsubst $(abssrcdir)/%,./%,$(TESTS))
+
+
+check:
+
+	$(PERL) $(topsrcdir)/regress/run_test.pl $(RUNTESTFLAGS) $(TESTS)
+	# only run upgrade test if RUNTESTFLAGS was not already doing that
+	if echo "$(RUNTESTFLAGS)" | grep -vq -- --upgrade; then \
+		$(PERL) $(topsrcdir)/regress/run_test.pl --upgrade $(RUNTESTFLAGS) $(TESTS); \
+	fi
+
+check-long:
+	$(PERL) $(topsrcdir)/regress/run_test.pl $(RUNTESTFLAGS) $(TESTS) $(TESTS_SLOW)
+
diff --git a/regress/sfcgal/Makefile.in b/regress/sfcgal/Makefile.in
index 3c1aa0f..00bdc77 100644
--- a/regress/sfcgal/Makefile.in
+++ b/regress/sfcgal/Makefile.in
@@ -3,9 +3,7 @@
 # * PostGIS - Spatial Types for PostgreSQL
 # * http://postgis.net
 # *
-# * Copyright (C) 2011-2012 Sandro Santilli <strk at kbt.io>
-# * Copyright (C) 2009-2011 Paul Ramsey <pramsey at cleverelephant.ca>
-# * Copyright (C) 2008-2009 Mark Cave-Ayland
+# * Copyright (C) 2020 Sandro Santilli <strk at kbt.io>
 # *
 # * This is free software; you can redistribute and/or modify it under
 # * the terms of the GNU General Public Licence. See the COPYING file.
@@ -13,45 +11,10 @@
 # **********************************************************************
 
 PERL=@PERL@
-TMPDIR?=/tmp
 
-HAVE_SFCGAL=@HAVE_SFCGAL@
+override RUNTESTFLAGS := $(RUNTESTFLAGS) --sfcgal
 
-ifeq ($(HAVE_SFCGAL),yes)
+topsrcdir = $(realpath ../../)
 
-# MingW hack: rather than use PGSQL_BINDIR directly, we change
-# to the directory and then use "pwd" to return the path. This
-# ensures that the returned path is in MSYS format, otherwise
-# colons in drive letters will break PATH.
-PGSQL_BINDIR=$(shell cd "@PGSQL_BINDIR@" && pwd)
-
-#
-# Put path from pg_config into front of search path
-#
-PATH := $(PGSQL_BINDIR):$(PATH)
-export PATH
-
-TESTS = \
-		regress_sfcgal \
-		approximatemedialaxis.sql
-
-test check:
-	$(PERL) ../run_test.pl --sfcgal $(RUNTESTFLAGS) $(TESTS)
-	# only run upgrade test if RUNTESTFLAGS was not already doing that
-	if echo "$(RUNTESTFLAGS)" | grep -vq -- --upgrade; then \
-		$(PERL) ../run_test.pl --sfcgal --upgrade $(RUNTESTFLAGS) $(TESTS); \
-	fi
-
-else
-
-check:
-
-endif # HAVE_SFCGAL
-
-distclean: clean
-	rm Makefile
-
-all install uninstall:
-
-
-clean:
+include tests.mk
+include ../runtest.mk
diff --git a/regress/sfcgal/tests.mk b/regress/sfcgal/tests.mk
new file mode 100644
index 0000000..c2a7ab7
--- /dev/null
+++ b/regress/sfcgal/tests.mk
@@ -0,0 +1,16 @@
+# **********************************************************************
+# *
+# * PostGIS - Spatial Types for PostgreSQL
+# * http://postgis.net
+# *
+# * Copyright (C) 2020 Sandro Santilli <strk at kbt.io>
+# *
+# * This is free software; you can redistribute and/or modify it under
+# * the terms of the GNU General Public Licence. See the COPYING file.
+# *
+# **********************************************************************
+
+TESTS += \
+		$(topsrcdir)/regress/sfcgal/regress_sfcgal \
+		$(topsrcdir)/regress/sfcgal/approximatemedialaxis.sql
+

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                                         |   3 +
 configure.ac                                       |   3 +
 regress/Makefile.in                                |  23 +-
 regress/core/Makefile.in                           | 240 +--------------------
 regress/core/regress.sql                           |   7 +-
 regress/core/tests.mk.in                           | 181 ++++++++++++++++
 {libpgcommon/cunit => regress/dumper}/Makefile.in  |  11 +-
 .../cunit/Makefile.in => regress/dumper/tests.mk   |  13 +-
 {libpgcommon/cunit => regress/loader}/Makefile.in  |  12 +-
 regress/loader/tests.mk                            |  40 ++++
 regress/runtest.mk                                 |  18 ++
 regress/sfcgal/Makefile.in                         |  47 +---
 .../cunit/Makefile.in => regress/sfcgal/tests.mk   |   9 +-
 13 files changed, 302 insertions(+), 305 deletions(-)
 create mode 100644 regress/core/tests.mk.in
 copy {libpgcommon/cunit => regress/dumper}/Makefile.in (72%)
 copy libpgcommon/cunit/Makefile.in => regress/dumper/tests.mk (57%)
 copy {libpgcommon/cunit => regress/loader}/Makefile.in (72%)
 create mode 100644 regress/loader/tests.mk
 create mode 100644 regress/runtest.mk
 copy libpgcommon/cunit/Makefile.in => regress/sfcgal/tests.mk (68%)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list