summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatoro Mahri <matoro@users.noreply.github.com>2022-10-01 20:33:35 -0400
committerSam James <sam@gentoo.org>2022-10-08 18:09:16 +0100
commit8e31df55cc42155a1ec3c86b017c128924e4f311 (patch)
tree605bcfca57f7efae6b13a9d6c6945aea36c64e55 /net-libs
parentsys-boot/colo: remove direct calls to toolchain components (diff)
downloadgentoo-8e31df55cc42155a1ec3c86b017c128924e4f311.tar.gz
gentoo-8e31df55cc42155a1ec3c86b017c128924e4f311.tar.bz2
gentoo-8e31df55cc42155a1ec3c86b017c128924e4f311.zip
net-libs/libpcap: add test
There's not really a test suite upstream (see mentioned link). There's a handful of "test programs" (which we at least test building and linking with this change), but this one (findalldevstest) is the only one that is actually run (under valgrind) in upstream CI. On the upside, it should be rather reproducible since only the loopback interface will ever be exposed inside the portage network sandbox. See: https://github.com/the-tcpdump-group/libpcap/issues/1012 Bug: https://bugs.gentoo.org/705802 Signed-off-by: Matoro Mahri <matoro@users.noreply.github.com> Closes: https://github.com/gentoo/gentoo/pull/27568 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/libpcap/libpcap-1.10.1-r2.ebuild8
1 files changed, 7 insertions, 1 deletions
diff --git a/net-libs/libpcap/libpcap-1.10.1-r2.ebuild b/net-libs/libpcap/libpcap-1.10.1-r2.ebuild
index 477ba7b57d29..21a95f1874b5 100644
--- a/net-libs/libpcap/libpcap-1.10.1-r2.ebuild
+++ b/net-libs/libpcap/libpcap-1.10.1-r2.ebuild
@@ -25,7 +25,8 @@ fi
LICENSE="BSD"
SLOT="0"
-IUSE="bluetooth dbus netlink rdma remote static-libs usb yydebug"
+IUSE="bluetooth dbus netlink rdma remote static-libs test usb yydebug"
+RESTRICT="!test? ( test )"
RDEPEND="
bluetooth? ( net-wireless/bluez:=[${MULTILIB_USEDEP}] )
@@ -83,6 +84,11 @@ multilib_src_configure() {
multilib_src_compile() {
emake all shared
+ use test && emake testprogs
+}
+
+multilib_src_test() {
+ testprogs/findalldevstest || die
}
multilib_src_install_all() {