commit: 5b12191959f0606be45499923f4b0589eef95a82 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Thu Jun 16 18:19:26 2022 +0000 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> CommitDate: Fri Jun 17 07:37:10 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b121919
dev-libs/nss: re-enable tests Bug: https://bugs.gentoo.org/474056 Signed-off-by: Sam James <sam <AT> gentoo.org> Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> dev-libs/nss/nss-3.79-r1.ebuild | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/dev-libs/nss/nss-3.79-r1.ebuild b/dev-libs/nss/nss-3.79-r1.ebuild index f0a86b80c6b6..52cecb9ce52d 100644 --- a/dev-libs/nss/nss-3.79-r1.ebuild +++ b/dev-libs/nss/nss-3.79-r1.ebuild @@ -16,7 +16,8 @@ SRC_URI="https://archive.mozilla.org/pub/security/nss/releases/${RTM_NAME}/src/$ LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris" -IUSE="cacert utils cpu_flags_ppc_altivec cpu_flags_ppc_vsx" +IUSE="cacert test utils cpu_flags_ppc_altivec cpu_flags_ppc_vsx" +RESTRICT="!test? ( test )" # pkg-config called by nss-config -> virtual/pkgconfig in RDEPEND RDEPEND=" >=dev-libs/nspr-${NSPR_VER}[${MULTILIB_USEDEP}] @@ -27,8 +28,6 @@ RDEPEND=" DEPEND="${RDEPEND}" BDEPEND="dev-lang/perl" -RESTRICT="test" - S="${WORKDIR}/${P}/${PN}" MULTILIB_CHOST_TOOLS=( @@ -170,6 +169,8 @@ multilib_src_compile() { export CC_IS_CLANG=1 fi + export NSS_DISABLE_GTESTS=$(usex !test 1 0) + # explicitly disable altivec/vsx if not requested # https://bugs.gentoo.org/789114 case ${ARCH} in @@ -199,6 +200,28 @@ multilib_src_compile() { done } +multilib_src_test() { + # https://www.linuxfromscratch.org/blfs/view/svn/postlfs/nss.html + # https://firefox-source-docs.mozilla.org/security/nss/legacy/nss_sources_building_testing/index.html#running_the_nss_test_suite + # https://www-archive.mozilla.org/projects/security/pki/nss/testnss_32.html (older) + export BUILD_OPT=1 + export HOST="localhost" + export DOMSUF="localdomain" + export USE_IP=TRUE + export IP_ADDRESS="127.0.0.1" + + NSINSTALL="${PWD}/$(find -type f -name nsinstall)" + + cd "${BUILD_DIR}"/tests || die + # Hack to get current objdir (prefixed dir where built binaries are) + # Without this, at least multilib tests go wrong when building the amd64 variant + # after x86. + local objdir=$(find "${BUILD_DIR}"/dist -maxdepth 1 -iname Linux* | rev | cut -d/ -f1 | rev) + + # Can tweak to a subset of tests in future if we need to, but would prefer not + OBJDIR="${objdir}" DIST="${BUILD_DIR}/dist" MOZILLA_ROOT="${BUILD_DIR}" ./all.sh || die +} + # Altering these 3 libraries breaks the CHK verification. # All of the following cause it to break: # - stripping
