summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-06-24 05:35:02 +0000
committerMike Frysinger <vapier@gentoo.org>2012-06-24 05:35:02 +0000
commitfad85b4d62b4660cce93c9822d23a5ef6cefd332 (patch)
tree8eebe1eccc29530c636cae4886927df9bbf9a70e /sys-apps/sandbox
parentCall cucumber directly to avoid unneeded dependency on rspec, bug 423217. Add... (diff)
downloadgentoo-2-fad85b4d62b4660cce93c9822d23a5ef6cefd332.tar.gz
gentoo-2-fad85b4d62b4660cce93c9822d23a5ef6cefd332.tar.bz2
gentoo-2-fad85b4d62b4660cce93c9822d23a5ef6cefd332.zip
Parallelize configure steps for multiple ABIs, and run tests in parallel.
(Portage version: 2.2.0_alpha112/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/sandbox')
-rw-r--r--sys-apps/sandbox/ChangeLog5
-rw-r--r--sys-apps/sandbox/sandbox-2.5.ebuild71
2 files changed, 48 insertions, 28 deletions
diff --git a/sys-apps/sandbox/ChangeLog b/sys-apps/sandbox/ChangeLog
index b7b6121854a4..dd429f50c7fa 100644
--- a/sys-apps/sandbox/ChangeLog
+++ b/sys-apps/sandbox/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for sys-apps/sandbox
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/sandbox/ChangeLog,v 1.162 2012/03/30 15:58:53 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/sandbox/ChangeLog,v 1.163 2012/06/24 05:35:02 vapier Exp $
+
+ 24 Jun 2012; Mike Frysinger <vapier@gentoo.org> sandbox-2.5.ebuild:
+ Parallelize configure steps for multiple ABIs, and run tests in parallel.
30 Mar 2012; Alexis Ballier <aballier@gentoo.org> sandbox-1.6-r2.ebuild:
keyword -x86-fbsd for bug #374425, sandbox is broken of fbsd and this leaves
diff --git a/sys-apps/sandbox/sandbox-2.5.ebuild b/sys-apps/sandbox/sandbox-2.5.ebuild
index be4fe93547f4..88f8d379cf56 100644
--- a/sys-apps/sandbox/sandbox-2.5.ebuild
+++ b/sys-apps/sandbox/sandbox-2.5.ebuild
@@ -1,13 +1,13 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/sandbox/sandbox-2.5.ebuild,v 1.9 2012/02/05 04:50:08 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/sandbox/sandbox-2.5.ebuild,v 1.10 2012/06/24 05:35:02 vapier Exp $
#
# don't monkey with this ebuild unless contacting portage devs.
# period.
#
-inherit eutils flag-o-matic toolchain-funcs multilib unpacker
+inherit eutils flag-o-matic toolchain-funcs multilib unpacker multiprocessing
DESCRIPTION="sandbox'd LD_PRELOAD hack"
HOMEPAGE="http://www.gentoo.org/"
@@ -33,45 +33,62 @@ sandbox_death_notice() {
sb_get_install_abis() { use multilib && get_install_abis || echo ${ABI:-default} ; }
-src_compile() {
- filter-lfs-flags #90228
-
+sb_foreach_abi() {
local OABI=${ABI}
for ABI in $(sb_get_install_abis) ; do
- mkdir "${WORKDIR}/build-${ABI}"
cd "${WORKDIR}/build-${ABI}"
-
- use multilib && multilib_toolchain_setup ${ABI}
-
- einfo "Configuring sandbox for ABI=${ABI}..."
- ECONF_SOURCE="../${P}/" \
- econf ${myconf} || die
- einfo "Building sandbox for ABI=${ABI}..."
- emake || die
+ einfo "Running $1 for ABI=${ABI}..."
+ "$@"
done
ABI=${OABI}
}
-src_test() {
+sb_configure() {
+ mkdir "${WORKDIR}/build-${ABI}"
+ cd "${WORKDIR}/build-${ABI}"
+
+ use multilib && multilib_toolchain_setup ${ABI}
+
+ einfo "Configuring sandbox for ABI=${ABI}..."
+ ECONF_SOURCE="../${P}/" \
+ econf ${myconf} || die
+}
+
+sb_compile() {
+ emake || die
+}
+
+src_compile() {
+ filter-lfs-flags #90228
+
+ # Run configures in parallel!
+ multijob_init
local OABI=${ABI}
for ABI in $(sb_get_install_abis) ; do
- cd "${WORKDIR}/build-${ABI}"
- einfo "Checking sandbox for ABI=${ABI}..."
- emake check || die "make check failed for ${ABI}"
+ multijob_child_init sb_configure
done
ABI=${OABI}
+ multijob_finish
+
+ sb_foreach_abi sb_compile
+}
+
+sb_test() {
+ emake check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)" || die
+}
+
+src_test() {
+ sb_foreach_abi sb_test
+}
+
+sb_install() {
+ emake DESTDIR="${D}" install || die
+ insinto /etc/sandbox.d #333131
+ doins etc/sandbox.d/00default || die
}
src_install() {
- local OABI=${ABI}
- for ABI in $(sb_get_install_abis) ; do
- cd "${WORKDIR}/build-${ABI}"
- einfo "Installing sandbox for ABI=${ABI}..."
- emake DESTDIR="${D}" install || die "make install failed for ${ABI}"
- insinto /etc/sandbox.d #333131
- doins etc/sandbox.d/00default || die
- done
- ABI=${OABI}
+ sb_foreach_abi sb_install
doenvd "${FILESDIR}"/09sandbox