aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-12-13 09:29:13 +0100
committerMichael Palimaka <kensington@gentoo.org>2017-01-08 01:42:08 +1100
commit4551c14eb8aecfdab59148ca1446464f33127736 (patch)
tree8d36a5aa6ba8f634de2d7d45a1bc031df130cd14
parentapp-office/calligra: Drop USE=eigen,marble,xml (diff)
downloadkde-4551c14e.tar.gz
kde-4551c14e.tar.bz2
kde-4551c14e.zip
cmake-utils.eclass: Support running ctest in parallel
Pass -j and --test-load options (with values based on MAKEOPTS) to CTest by default, in order to enable parallel test runs.
-rw-r--r--eclass/cmake-utils.eclass7
1 files changed, 4 insertions, 3 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index 1b269dd6d1..099aaac7b2 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -117,7 +117,7 @@ case ${EAPI} in
*) die "EAPI=${EAPI:-0} is not supported" ;;
esac
-inherit toolchain-funcs multilib flag-o-matic eutils versionator
+inherit toolchain-funcs multilib flag-o-matic eutils multiprocessing versionator
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
@@ -780,8 +780,9 @@ enable_cmake-utils_src_test() {
[[ -n ${TEST_VERBOSE} ]] && myctestargs+=( --extra-verbose --output-on-failure )
- echo ctest "${myctestargs[@]}" "$@"
- if ctest "${myctestargs[@]}" "$@" ; then
+ set -- ctest -j "$(makeopts_jobs)" --test-load "$(makeopts_loadavg)" "${myctestargs[@]}" "$@"
+ echo "$@" >&2
+ if "$@" ; then
einfo "Tests succeeded."
popd > /dev/null || die
return 0