[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha2-7-ga714a46
git at osgeo.org
git at osgeo.org
Tue Jul 28 04:06:38 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 a714a468037fc30ce7b2a29db2bc02e0accda098 (commit)
from da2b1d8a0a5c3dd2d12fca0bc6d660f35a9c7be3 (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 a714a468037fc30ce7b2a29db2bc02e0accda098
Author: Raúl Marín <git at rmr.ninja>
Date: Tue Jul 28 12:17:03 2020 +0200
Use finishGEOS to remove valgrind noise in unit tests
Closes https://github.com/postgis/postgis/pull/571
diff --git a/liblwgeom/cunit/cu_node.c b/liblwgeom/cunit/cu_node.c
index 1e16631..b97f1f3 100644
--- a/liblwgeom/cunit/cu_node.c
+++ b/liblwgeom/cunit/cu_node.c
@@ -15,6 +15,7 @@
#include "liblwgeom.h"
#include "liblwgeom_internal.h"
+#include "../lwgeom_geos.h"
static void test_lwgeom_node(void)
{
@@ -58,12 +59,19 @@ static void test_lwgeom_node(void)
lwfree(tmp); lwgeom_free(out); lwgeom_free(in);
}
+static int
+clean_geos_node_suite(void)
+{
+ finishGEOS();
+ return 0;
+}
+
/*
** Used by test harness to register the tests in this file.
*/
void node_suite_setup(void);
void node_suite_setup(void)
{
- CU_pSuite suite = CU_add_suite("noding", NULL, NULL);
+ CU_pSuite suite = CU_add_suite("noding", NULL, clean_geos_node_suite);
PG_ADD_TEST(suite, test_lwgeom_node);
}
diff --git a/liblwgeom/cunit/cu_split.c b/liblwgeom/cunit/cu_split.c
index 1e9e73b..6481c63 100644
--- a/liblwgeom/cunit/cu_split.c
+++ b/liblwgeom/cunit/cu_split.c
@@ -15,6 +15,7 @@
#include "liblwgeom.h"
#include "liblwgeom_internal.h"
+#include "../lwgeom_geos.h"
static void test_lwline_split_by_point_to(void)
{
@@ -274,6 +275,12 @@ static void test_lwgeom_split(void)
lwgeom_free(blade);
}
+static int
+clean_geos_split_suite(void)
+{
+ finishGEOS();
+ return 0;
+}
/*
** Used by test harness to register the tests in this file.
@@ -281,7 +288,7 @@ static void test_lwgeom_split(void)
void split_suite_setup(void);
void split_suite_setup(void)
{
- CU_pSuite suite = CU_add_suite("split", NULL, NULL);
+ CU_pSuite suite = CU_add_suite("split", NULL, clean_geos_split_suite);
PG_ADD_TEST(suite, test_lwline_split_by_point_to);
PG_ADD_TEST(suite, test_lwgeom_split);
}
diff --git a/liblwgeom/cunit/cu_triangulate.c b/liblwgeom/cunit/cu_triangulate.c
index b46ac90..45b8398 100644
--- a/liblwgeom/cunit/cu_triangulate.c
+++ b/liblwgeom/cunit/cu_triangulate.c
@@ -15,6 +15,7 @@
#include "cu_tester.h"
#include "liblwgeom_internal.h"
+#include "../lwgeom_geos.h"
static void
test_lwgeom_delaunay_triangulation(void)
@@ -102,6 +103,13 @@ test_lwgeom_voronoi_diagram_expected_empty(void)
assert_empty_diagram("MULTIPOINT (0 0, 0 0.00001)", 0.001);
}
+static int
+clean_geos_triangulate_suite(void)
+{
+ finishGEOS();
+ return 0;
+}
+
/*
** Used by test harness to register the tests in this file.
*/
@@ -109,7 +117,7 @@ void triangulate_suite_setup(void);
void
triangulate_suite_setup(void)
{
- CU_pSuite suite = CU_add_suite("triangulate", NULL, NULL);
+ CU_pSuite suite = CU_add_suite("triangulate", NULL, clean_geos_triangulate_suite);
PG_ADD_TEST(suite, test_lwgeom_delaunay_triangulation);
PG_ADD_TEST(suite, test_lwgeom_voronoi_diagram);
PG_ADD_TEST(suite, test_lwgeom_voronoi_diagram_expected_empty);
diff --git a/liblwgeom/cunit/cu_wrapx.c b/liblwgeom/cunit/cu_wrapx.c
index 9f246f3..78c757a 100644
--- a/liblwgeom/cunit/cu_wrapx.c
+++ b/liblwgeom/cunit/cu_wrapx.c
@@ -15,6 +15,7 @@
#include "liblwgeom.h"
#include "liblwgeom_internal.h"
+#include "../lwgeom_geos.h"
static void test_lwgeom_wrapx(void)
{
@@ -147,6 +148,12 @@ static void test_lwgeom_wrapx(void)
}
+static int
+clean_geos_wrapx_suite(void)
+{
+ finishGEOS();
+ return 0;
+}
/*
** Used by test harness to register the tests in this file.
@@ -154,6 +161,6 @@ static void test_lwgeom_wrapx(void)
void wrapx_suite_setup(void);
void wrapx_suite_setup(void)
{
- CU_pSuite suite = CU_add_suite("wrapx", NULL, NULL);
+ CU_pSuite suite = CU_add_suite("wrapx", NULL, clean_geos_wrapx_suite);
PG_ADD_TEST(suite, test_lwgeom_wrapx);
}
-----------------------------------------------------------------------
Summary of changes:
liblwgeom/cunit/cu_node.c | 10 +++++++++-
liblwgeom/cunit/cu_split.c | 9 ++++++++-
liblwgeom/cunit/cu_triangulate.c | 10 +++++++++-
liblwgeom/cunit/cu_wrapx.c | 9 ++++++++-
4 files changed, 34 insertions(+), 4 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list