From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/pdal/files/, sci-libs/pdal/
Date: Sat, 26 Feb 2022 02:30:00 +0000 (UTC) [thread overview]
Message-ID: <1645842445.f00caec850988c5051a625c7d1466f259aeee50a.sam@gentoo> (raw)
commit: f00caec850988c5051a625c7d1466f259aeee50a
Author: Thomas Bettler <thomas.bettler <AT> gmail <DOT> com>
AuthorDate: Mon Feb 21 18:18:54 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 26 02:27:25 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f00caec8
sci-libs/pdal: fix tests
Closes: https://bugs.gentoo.org/833820
Closes: https://github.com/gentoo/gentoo/pull/24303
Signed-off-by: Thomas Bettler <thomas.bettler <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/pdal-2.3.0-fix_tests_for_proj811.patch | 110 +++++++++++++++++++++
sci-libs/pdal/pdal-2.3.0.ebuild | 14 ++-
2 files changed, 123 insertions(+), 1 deletion(-)
diff --git a/sci-libs/pdal/files/pdal-2.3.0-fix_tests_for_proj811.patch b/sci-libs/pdal/files/pdal-2.3.0-fix_tests_for_proj811.patch
new file mode 100644
index 000000000000..6a34686330f4
--- /dev/null
+++ b/sci-libs/pdal/files/pdal-2.3.0-fix_tests_for_proj811.patch
@@ -0,0 +1,110 @@
+From https://github.com/PDAL/PDAL/commit/1a7415f67cfe13f816345ce4b7fc1c68f0a45c83
+Bug https://bugs.gentoo.org/833820
+From: Andrew Bell <andrew.bell.ia@gmail.com>
+Date: Thu, 7 Oct 2021 11:15:18 -0400
+Subject: [PATCH] Work around test issues with varying versions of PROJ (#3560)
+
+* Add range for crop because of varying proj precision.
+
+* Fix tests for PROJ 8.1.1
+
+* More test workaround for proj.
+---
+ test/unit/filters/CropFilterTest.cpp | 10 +++++++
+ test/unit/io/EptReaderTest.cpp | 41 +++++++++++++++++++++++++++-
+ 2 files changed, 50 insertions(+), 1 deletion(-)
+
+diff --git a/test/unit/filters/CropFilterTest.cpp b/test/unit/filters/CropFilterTest.cpp
+index 23ccb465bc..f4b825c891 100644
+--- a/test/unit/filters/CropFilterTest.cpp
++++ b/test/unit/filters/CropFilterTest.cpp
+@@ -250,7 +250,17 @@ TEST(CropFilterTest, test_crop_polygon_reprojection)
+ PointViewSet viewSet = crop.execute(table);
+ EXPECT_EQ(viewSet.size(), 1u);
+ view = *viewSet.begin();
++//ABELL - I'd like to do the following, but we don't necessarily have proj.h
++/**
++#if defined(PROJ_VERSION_NUMBER) && PROJ_VERSION_NUMBER > 80101
++ EXPECT_EQ(view->size(), 45u);
++#else
+ EXPECT_EQ(view->size(), 47u);
++#endif
++**/
++// So instead...
++ EXPECT_GE(view->size(), 45u);
++ EXPECT_LE(view->size(), 47u);
+
+ FileUtils::closeFile(wkt_stream);
+ }
+diff --git a/test/unit/io/EptReaderTest.cpp b/test/unit/io/EptReaderTest.cpp
+index ab5cfdee4a..0d274d4c08 100644
+--- a/test/unit/io/EptReaderTest.cpp
++++ b/test/unit/io/EptReaderTest.cpp
+@@ -625,8 +625,21 @@ TEST(EptReaderTest, boundedCrop)
+ }
+
+ EXPECT_EQ(eptNp, sourceNp);
++
++//ABELL - A change in proj changed the numbers, but we don't necessarily have proj.h
++/**
++#if defined(PROJ_VERSION_NUMBER) && PROJ_VERSION_NUMBER > 80101
++ EXPECT_EQ(eptNp, 45u);
++ EXPECT_EQ(sourceNp, 45u);
++#else
+ EXPECT_EQ(eptNp, 47u);
+ EXPECT_EQ(sourceNp, 47u);
++#endif
++**/
++ EXPECT_GE(eptNp, 45u);
++ EXPECT_GE(sourceNp, 45u);
++ EXPECT_LE(eptNp, 47u);
++ EXPECT_LE(sourceNp, 47u);
+ }
+
+ TEST(EptReaderTest, polygonAndBoundsCrop)
+@@ -769,8 +782,20 @@ TEST(EptReaderTest, boundedCropReprojection)
+ sourceNp += view->size();
+
+ EXPECT_EQ(eptNp, sourceNp);
++//ABELL - We don't necessarily have proj.h, so we can't do this:
++/**
++#if defined(PROJ_VERSION_NUMBER) && PROJ_VERSION_NUMBER > 80101
++ EXPECT_EQ(eptNp, 45u);
++ EXPECT_EQ(sourceNp, 45u);
++#else
+ EXPECT_EQ(eptNp, 47u);
+ EXPECT_EQ(sourceNp, 47u);
++#endif
++**/
++ EXPECT_GE(eptNp, 45u);
++ EXPECT_GE(sourceNp, 45u);
++ EXPECT_LE(eptNp, 47u);
++ EXPECT_LE(sourceNp, 47u);
+ }
+
+
+@@ -811,9 +836,23 @@ TEST(EptReaderTest, ogrCrop)
+ for (const PointViewPtr& view : source.execute(sourceTable))
+ sourceNp += view->size();
+
+- EXPECT_EQ(eptNp, sourceNp);
++//ABELL - PROJ changed to make the number of points that pass the filter different from
++// what's in the file we've got stored.
++// EXPECT_EQ(eptNp, sourceNp);
++//ABELL - We don't necessarily have proj.h, so can't do the following:
++/**
++#if defined(PROJ_VERSION_NUMBER) && PROJ_VERSION_NUMBER > 80101
++ EXPECT_EQ(eptNp, 89u);
++ EXPECT_EQ(sourceNp, 89u);
++#else
+ EXPECT_EQ(eptNp, 86u);
+ EXPECT_EQ(sourceNp, 86u);
++#endif
++**/
++ EXPECT_LE(eptNp, 89u);
++ EXPECT_LE(sourceNp, 89u);
++ EXPECT_GE(eptNp, 86u);
++ EXPECT_GE(sourceNp, 86u);
+ }
+
+ } // namespace pdal
diff --git a/sci-libs/pdal/pdal-2.3.0.ebuild b/sci-libs/pdal/pdal-2.3.0.ebuild
index f85812782818..949b5ab43e8b 100644
--- a/sci-libs/pdal/pdal-2.3.0.ebuild
+++ b/sci-libs/pdal/pdal-2.3.0.ebuild
@@ -12,7 +12,8 @@ SRC_URI="https://github.com/PDAL/PDAL/releases/download/${PV}/PDAL-${PV}-src.tar
LICENSE="BSD"
SLOT="0/13"
KEYWORDS="~amd64 ~x86"
-IUSE="postgres"
+IUSE="postgres test"
+RESTRICT="!test? ( test )"
BDEPEND="
virtual/pkgconfig
@@ -26,12 +27,14 @@ DEPEND="
sys-libs/libunwind
sys-libs/zlib
postgres? ( dev-db/postgresql:*[xml] )
+ test? ( sci-libs/gdal[geos,jpeg,png] )
"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}"/${P}-fix_cmake_install_location.patch
"${FILESDIR}"/${P}-upgrade_cmake_min.patch
+ "${FILESDIR}"/${P}-fix_tests_for_proj811.patch
)
S="${WORKDIR}/PDAL-${PV}-src"
@@ -46,3 +49,12 @@ src_configure() {
cmake_src_configure
}
+
+src_test() {
+ local myctestargs=(
+ --exclude-regex '(pgpointcloudtest|pdal_io_bpf_base_test|pdal_io_bpf_zlib_test|pdal_filters_overlay_test|pdal_filters_stats_test|pdal_app_plugin_test|pdal_merge_test)'
+ --output-on-failure
+ )
+
+ cmake_src_test
+}
next reply other threads:[~2022-02-26 2:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-26 2:30 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-09-11 8:13 [gentoo-commits] repo/gentoo:master commit in: sci-libs/pdal/files/, sci-libs/pdal/ Sam James
2025-05-22 19:43 Sam James
2024-04-24 12:51 Conrad Kostecki
2023-05-14 7:26 Sam James
2023-05-14 7:03 Andreas Sturmlechner
2022-02-20 23:11 Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1645842445.f00caec850988c5051a625c7d1466f259aeee50a.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox