commit: 8e31df55cc42155a1ec3c86b017c128924e4f311 Author: Matoro Mahri <matoro <AT> users <DOT> noreply <DOT> github <DOT> com> AuthorDate: Sun Oct 2 00:33:35 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Oct 8 17:09:16 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e31df55
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 <AT> users.noreply.github.com> Closes: https://github.com/gentoo/gentoo/pull/27568 Signed-off-by: Sam James <sam <AT> gentoo.org> net-libs/libpcap/libpcap-1.10.1-r2.ebuild | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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() {
