From b9d1c7a4bc228ba4750c3207ca24056b73fd6cc3 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 9 Apr 2025 09:00:03 +0100 Subject: dev-cpp/lucene++: wire up tests On one run (out of 6 or so), I did hit: ``` [ RUN ] IndexWriterTest.testAddIndexesWithRollback lucene++-tester: /usr/include/boost/smart_ptr/shared_ptr.hpp:550: typename boost::detail::sp_member_access::type boost::shared_ptr::operator->() const [with T = Lucene::DocumentsWriter; typename boost::detail::sp_member_access::type = Lucene::DocumentsWriter*]: Assertion `px != 0' failed. /var/tmp/portage/dev-cpp/lucene++-3.0.9/temp/environment: line 1082: 28 Aborted (core dumped) "$@" ``` Not sure if it's another instance of something like https://github.com/luceneplusplus/LucenePlusPlus/issues/181 or what, but not debugged further as the testsuite takes a while and had already spent too much time on lucene++ today. The test restriction had been there since the package was added. Signed-off-by: Sam James --- .../files/lucene++-3.0.9-tests-gtest-cstdint.patch | 10 ++++++++++ dev-cpp/lucene++/lucene++-3.0.9.ebuild | 18 ++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 dev-cpp/lucene++/files/lucene++-3.0.9-tests-gtest-cstdint.patch (limited to 'dev-cpp/lucene++') diff --git a/dev-cpp/lucene++/files/lucene++-3.0.9-tests-gtest-cstdint.patch b/dev-cpp/lucene++/files/lucene++-3.0.9-tests-gtest-cstdint.patch new file mode 100644 index 000000000000..02cb8956543e --- /dev/null +++ b/dev-cpp/lucene++/files/lucene++-3.0.9-tests-gtest-cstdint.patch @@ -0,0 +1,10 @@ +--- a/src/test/gtest/googletest/src/gtest-death-test.cc ++++ b/src/test/gtest/googletest/src/gtest-death-test.cc +@@ -32,6 +32,7 @@ + + #include "gtest/gtest-death-test.h" + ++#include + #include + + #include "gtest/internal/gtest-port.h" diff --git a/dev-cpp/lucene++/lucene++-3.0.9.ebuild b/dev-cpp/lucene++/lucene++-3.0.9.ebuild index a774b663b0cb..649549be2b75 100644 --- a/dev-cpp/lucene++/lucene++-3.0.9.ebuild +++ b/dev-cpp/lucene++/lucene++-3.0.9.ebuild @@ -4,7 +4,7 @@ EAPI=8 MY_P="LucenePlusPlus-rel_${PV}" -inherit cmake +inherit edo cmake flag-o-matic DESCRIPTION="C++ port of Lucene library, a high-performance, full-featured text search engine" HOMEPAGE="https://github.com/luceneplusplus/LucenePlusPlus" @@ -14,8 +14,8 @@ S="${WORKDIR}/${MY_P}" LICENSE="|| ( LGPL-3 Apache-2.0 )" SLOT="0" KEYWORDS="~amd64 ~hppa ~loong ~ppc ~ppc64 ~sparc ~x86" -IUSE="debug" -RESTRICT="test" +IUSE="debug test" +RESTRICT="!test? ( test )" DEPEND="dev-libs/boost:=[zlib]" RDEPEND="${DEPEND}" @@ -24,13 +24,23 @@ PATCHES=( "${FILESDIR}/${PN}-3.0.7-boost-1.85.patch" "${FILESDIR}/${PN}-3.0.9-boost-1.87.patch" "${FILESDIR}/${PN}-3.0.9-pkgconfig.patch" + "${FILESDIR}/${PN}-3.0.9-tests-gtest-cstdint.patch" ) src_configure() { + # Can't be tested with LTO because of ODR issues in test mocks + filter-lto + local mycmakeargs=( -DENABLE_DEMO=OFF - -DENABLE_TEST=OFF + -DENABLE_TEST=$(usex test) ) cmake_src_configure } + +src_test() { + edo "${BUILD_DIR}"/src/test/lucene++-tester \ + --test_dir="${S}"/src/test/testfiles \ + --gtest_filter="-ParallelMultiSearcherTest*:SortTest.*:" +} -- cgit v1.2.3