summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-05-25 04:33:05 +0000
committerMike Frysinger <vapier@gentoo.org>2012-05-25 04:33:05 +0000
commiteaea2ce1de223ff6db5a143490db159be713fbb0 (patch)
treef10f46116e2d5ca6fc86a793c3d7acd67bd0ff0c /sys-apps/keyutils/keyutils-1.5.5.ebuild
parentBuild with -fno-strict-overflow. FreeBSD time code depends on overflow. #324452 (diff)
downloadhistorical-eaea2ce1de223ff6db5a143490db159be713fbb0.tar.gz
historical-eaea2ce1de223ff6db5a143490db159be713fbb0.tar.bz2
historical-eaea2ce1de223ff6db5a143490db159be713fbb0.zip
Make the tests work reliably #405293 by Patrick Lauer.
Package-Manager: portage-HEAD/cvs/Linux x86_64
Diffstat (limited to 'sys-apps/keyutils/keyutils-1.5.5.ebuild')
-rw-r--r--sys-apps/keyutils/keyutils-1.5.5.ebuild22
1 files changed, 21 insertions, 1 deletions
diff --git a/sys-apps/keyutils/keyutils-1.5.5.ebuild b/sys-apps/keyutils/keyutils-1.5.5.ebuild
index 3d4dd960f81d..6459b9b2d427 100644
--- a/sys-apps/keyutils/keyutils-1.5.5.ebuild
+++ b/sys-apps/keyutils/keyutils-1.5.5.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/keyutils/keyutils-1.5.5.ebuild,v 1.1 2012/02/21 08:14:32 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/keyutils/keyutils-1.5.5.ebuild,v 1.2 2012/05/25 04:33:05 vapier Exp $
EAPI="3"
@@ -27,12 +27,32 @@ src_prepare() {
-e "/^LIBDIR/s:=.*:=/usr/$(get_libdir):" \
-e '/^USRLIBDIR/s:=.*:=$(LIBDIR):' \
Makefile || die
+
+ # The lsb check is useless, so avoid spurious command not found messages.
+ sed -i -e 's,lsb_release,:,' tests/prepare.inc.sh || die
+ # All the test files are bash, but try to execute via `sh`.
+ sed -i -r \
+ -e 's:([[:space:]])sh([[:space:]]):\1bash\2:' \
+ tests/{Makefile*,*.sh} || die
+ find tests/ -name '*.sh' -exec sed -i '1s:/sh$:/bash:' {} +
+ # Some tests call the kernel which calls userspace, but that will
+ # run the install keyutils rather than the locally compiled one,
+ # so disable round trip tests.
+ rm -rf tests/keyctl/requesting/{bad-args,piped,valid}
}
src_configure() {
tc-export CC
}
+src_test() {
+ # Execute the locally compiled code rather than the
+ # older versions already installed in the system.
+ LD_LIBRARY_PATH=${S} \
+ PATH="${S}:${PATH}" \
+ emake test || die
+}
+
src_install() {
emake DESTDIR="${ED}" install || die
dodoc README