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 D1BF6158091 for ; Fri, 17 Jun 2022 07:37:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DD2C4E0946; Fri, 17 Jun 2022 07:37:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 C4D00E0935 for ; Fri, 17 Jun 2022 07:37:17 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 C1562342045 for ; Fri, 17 Jun 2022 07:37:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4227150A for ; Fri, 17 Jun 2022 07:37:15 +0000 (UTC) From: "Joonas Niilola" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" Message-ID: <1655451431.ebfdcca1d782de04fa8c1290d2954339a10f71bb.juippis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/nspr/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/nspr/nspr-4.34.ebuild X-VCS-Directories: dev-libs/nspr/ X-VCS-Committer: juippis X-VCS-Committer-Name: Joonas Niilola X-VCS-Revision: ebfdcca1d782de04fa8c1290d2954339a10f71bb X-VCS-Branch: master Date: Fri, 17 Jun 2022 07:37:15 +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: 7a40701e-1d7a-4c59-91df-46423075d631 X-Archives-Hash: 09a8d7015c9eb782ec01357c161ea658 commit: ebfdcca1d782de04fa8c1290d2954339a10f71bb Author: Sam James gentoo org> AuthorDate: Thu Jun 16 19:42:24 2022 +0000 Commit: Joonas Niilola gentoo org> CommitDate: Fri Jun 17 07:37:11 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ebfdcca1 dev-libs/nspr: wire up tests Signed-off-by: Sam James gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/25930 Signed-off-by: Joonas Niilola gentoo.org> dev-libs/nspr/nspr-4.34.ebuild | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/dev-libs/nspr/nspr-4.34.ebuild b/dev-libs/nspr/nspr-4.34.ebuild index 62e73fc0c568..d009166eea48 100644 --- a/dev-libs/nspr/nspr-4.34.ebuild +++ b/dev-libs/nspr/nspr-4.34.ebuild @@ -103,6 +103,37 @@ multilib_src_configure() { econf "${myconf[@]}" } +multilib_src_test() { + # https://firefox-source-docs.mozilla.org/nspr/running_nspr_tests.html + cd "${BUILD_DIR}/pr/tests" || die + einfo "Building tests" + emake + + einfo "Running test suite" + ../../../${P}/${PN}/pr/tests/runtests.pl | tee "${T}"/${ABI}-tests.log + + # Needed to check if runtests.pl itself or the tee (somehow) failed + # (can't use die with pipes to check each component) + [[ ${PIPESTATUS[@]} == "0 0" ]] || die "Tests failed to run!" + + local known_failures=( + # network-sandbox related? + cltsrv + # network-sandbox related? + gethost + ) + + local known_failure + for known_failure in "${known_failures[@]}" ; do + sed -i -e "/${known_failure}.*FAILED/d" "${T}"/${ABI}-tests.log || die + done + + # But to actually check the test results, we examine the log. + if grep -q "FAILED" "${T}"/${ABI}-tests.log ; then + die "Test failure for ${ABI}!" + fi +} + multilib_src_install() { # Their build system is royally confusing, as usual MINOR_VERSION=${MIN_PV} # Used for .so version