summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-06-16 19:19:26 +0100
committerJoonas Niilola <juippis@gentoo.org>2022-06-17 10:37:10 +0300
commit5b12191959f0606be45499923f4b0589eef95a82 (patch)
tree2c3cecaad9aeb9b59315b7db0407d3383e1f40bf /dev-libs/nss
parentsys-kernel/pf-sources: add 5.18-pf2 (diff)
downloadgentoo-5b12191959f0606be45499923f4b0589eef95a82.tar.gz
gentoo-5b12191959f0606be45499923f4b0589eef95a82.tar.bz2
gentoo-5b12191959f0606be45499923f4b0589eef95a82.zip
dev-libs/nss: re-enable tests
Bug: https://bugs.gentoo.org/474056 Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-libs/nss')
-rw-r--r--dev-libs/nss/nss-3.79-r1.ebuild29
1 files 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