From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0B960158094 for ; Wed, 7 Sep 2022 12:26:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3BC2CE0A96; Wed, 7 Sep 2022 12:26:11 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 26BD4E0A98 for ; Wed, 7 Sep 2022 12:26:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 06848340E3D for ; Wed, 7 Sep 2022 12:26:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 747CE5B1 for ; Wed, 7 Sep 2022 12:26:08 +0000 (UTC) From: "Marek Szuba" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Marek Szuba" Message-ID: <1662553564.51e27b02d555d31977600d44ce26b6aa04d1987a.marecki@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/xrootd/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-libs/xrootd/xrootd-5.4.3-r2.ebuild X-VCS-Directories: net-libs/xrootd/ X-VCS-Committer: marecki X-VCS-Committer-Name: Marek Szuba X-VCS-Revision: 51e27b02d555d31977600d44ce26b6aa04d1987a X-VCS-Branch: master Date: Wed, 7 Sep 2022 12:26:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e078ff24-9648-4a54-8862-24469d0ceb41 X-Archives-Hash: 09407167b3ad9e827c3ae1bb4244c3ab commit: 51e27b02d555d31977600d44ce26b6aa04d1987a Author: Marek Szuba gentoo org> AuthorDate: Wed Sep 7 12:25:36 2022 +0000 Commit: Marek Szuba gentoo org> CommitDate: Wed Sep 7 12:26:04 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51e27b02 net-libs/xrootd: run native tests at build time instead of just installing them Signed-off-by: Marek Szuba gentoo.org> net-libs/xrootd/xrootd-5.4.3-r2.ebuild | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/net-libs/xrootd/xrootd-5.4.3-r2.ebuild b/net-libs/xrootd/xrootd-5.4.3-r2.ebuild index e0c005ecfcb9..835ba9ab3318 100644 --- a/net-libs/xrootd/xrootd-5.4.3-r2.ebuild +++ b/net-libs/xrootd/xrootd-5.4.3-r2.ebuild @@ -16,11 +16,9 @@ SRC_URI="https://xrootd.slac.stanford.edu/download/v${PV}/${P}.tar.gz" LICENSE="LGPL-3" SLOT="0" KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="doc examples fuse http kerberos +libxml2 python readline +server systemd test test-suite" +IUSE="doc examples fuse http kerberos +libxml2 python readline +server systemd test" -# Python tests currently require manual configuration and start-up of an xrootd server. -# No actual build-time test suite for native code. -RESTRICT="test" +RESTRICT="!test? ( test )" CDEPEND="acct-group/xrootd acct-user/xrootd @@ -34,7 +32,6 @@ CDEPEND="acct-group/xrootd python? ( ${PYTHON_DEPS} ) readline? ( sys-libs/readline:0= ) systemd? ( sys-apps/systemd:= ) - test-suite? ( dev-util/cppunit ) " DEPEND="${CDEPEND}" BDEPEND=" @@ -48,6 +45,7 @@ BDEPEND=" ${DISTUTILS_DEPS} test? ( >=dev-python/pytest-7.1.2[${PYTHON_USEDEP}] ) ) + test? ( dev-util/cppunit ) " RDEPEND="${CDEPEND} dev-lang/perl @@ -56,7 +54,6 @@ REQUIRED_USE=" http? ( kerberos ) python? ( ${PYTHON_REQUIRED_USE} ) test? ( server ) - test-suite? ( server ) " PATCHES=( @@ -95,7 +92,7 @@ src_configure() { -DENABLE_LIBXML2=$(usex libxml2) -DENABLE_PYTHON=$(usex python) -DENABLE_READLINE=$(usex readline) - -DENABLE_TESTS=$(usex test-suite) + -DENABLE_TESTS=$(usex test) -DENABLE_VOMS=no -DFORCE_ENABLED=yes -DXRDCL_ONLY=$(usex server "no" "yes") @@ -129,7 +126,17 @@ python_test() { } src_test() { - use python && distutils-r1_src_test + pushd "${BUILD_DIR}/tests" > /dev/null || die + # There are more tests but since these are ones currently run by upstream in their CI, + # let's follow their example. + ./common/test-runner ./XrdClTests/libXrdClTests.so "All Tests/UtilsTest/" || die + ./common/test-runner ./XrdClTests/libXrdClTests.so "All Tests/SocketTest/" || die + ./common/test-runner ./XrdClTests/libXrdClTests.so "All Tests/PollerTest/" || die + popd > /dev/null || die + + # Python tests currently require manual configuration and start-up of an xrootd server. + # TODO: get this to run properly. + #use python && distutils-r1_src_test } src_install() { @@ -170,4 +177,11 @@ src_install() { dodoc -r bindings/python/examples fi fi + + if use test; then + for f in test-runner xrdshmap; do + rm "${ED}"/usr/bin/${f} || die "Failed to remove test helper ${f} from installed tree" + done + rm "${ED}"/usr/$(get_libdir)/libXrdClTest*.so || die "Failed to remove test libraries from installed tree" + fi }