commit:     cef2d1212ac1586143460250c4c42748ad36c45d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue May 20 14:25:41 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May 20 14:26:43 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cef2d121

net-libs/libpcapnav: EAPI 8, wire up tests

* EAPI 8
* Drop test restriction, patch tests to exit correctly on failure reflecting
  the result, and wire up src_test accordingly
* Drop "commented out" jer_src_compile

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/libpcapnav-0.8-test-exit-on-failure.patch  | 12 ++++++++++++
 ...capnav-0.8-r1.ebuild => libpcapnav-0.8-r2.ebuild} | 20 ++++++++++++--------
 2 files changed, 24 insertions(+), 8 deletions(-)

diff --git 
a/net-libs/libpcapnav/files/libpcapnav-0.8-test-exit-on-failure.patch 
b/net-libs/libpcapnav/files/libpcapnav-0.8-test-exit-on-failure.patch
new file mode 100644
index 000000000000..1044eac7d319
--- /dev/null
+++ b/net-libs/libpcapnav/files/libpcapnav-0.8-test-exit-on-failure.patch
@@ -0,0 +1,12 @@
+--- a/test/run-tests.sh
++++ b/test/run-tests.sh
+@@ -12,7 +12,9 @@ else
+         diff test1-result.trace test1-correct.be.trace &> /dev/null
+         if test $? -eq 0; then
+                 echo "passed."
++                exit 0
+         else
+                 echo "FAILED."
++                exit 1
+         fi
+ fi

diff --git a/net-libs/libpcapnav/libpcapnav-0.8-r1.ebuild 
b/net-libs/libpcapnav/libpcapnav-0.8-r2.ebuild
similarity index 77%
rename from net-libs/libpcapnav/libpcapnav-0.8-r1.ebuild
rename to net-libs/libpcapnav/libpcapnav-0.8-r2.ebuild
index 2cfe5de3d43c..41a6c31eb836 100644
--- a/net-libs/libpcapnav/libpcapnav-0.8-r1.ebuild
+++ b/net-libs/libpcapnav/libpcapnav-0.8-r2.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
-inherit autotools
+EAPI=8
+
+inherit autotools edo
 
 DESCRIPTION="Libpcap wrapper library to navigate to arbitrary packets in a 
tcpdump trace file"
 HOMEPAGE="http://netdude.sourceforge.net/";
@@ -15,11 +16,11 @@ IUSE="doc static-libs"
 
 DEPEND="net-libs/libpcap"
 RDEPEND="${DEPEND}"
-RESTRICT="test"
-DOCS=( AUTHORS ChangeLog README )
+
 PATCHES=(
        "${FILESDIR}"/${P}-includes.patch
        "${FILESDIR}"/${P}-noinst_test.patch
+       "${FILESDIR}"/${P}-test-exit-on-failure.patch
 )
 
 src_prepare() {
@@ -31,14 +32,17 @@ src_configure() {
        econf $(use_enable static-libs static)
 }
 
-jer_src_compile() {
-       emake SUBDIRS="src docs"
+src_test() {
+       emake check
+
+       cd test || die
+       edo ./run-tests.sh
 }
 
 src_install() {
        default
 
-       rm -fr "${D}"/usr/share/gtk-doc
+       rm -fr "${ED}"/usr/share/gtk-doc || die
 
        if use doc; then
                docinto html

Reply via email to