commit: 4551c14eb8aecfdab59148ca1446464f33127736 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Tue Dec 13 08:29:13 2016 +0000 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> CommitDate: Sat Jan 7 14:42:08 2017 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=4551c14e
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. eclass/cmake-utils.eclass | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index 1b269dd..099aaac 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