commit: 086560a10b2f0b69559708f337868db7c091f7f2 Author: Alfred Persson Forsberg <cat <AT> catcream <DOT> org> AuthorDate: Wed Aug 24 02:16:50 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Oct 16 20:34:39 2022 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=086560a1
cmake.eclass: add CMAKE_SKIP_TESTS Signed-off-by: Alfred Persson Forsberg <cat <AT> catcream.org> Closes: https://github.com/gentoo/gentoo/pull/27052 Signed-off-by: Sam James <sam <AT> gentoo.org> eclass/cmake.eclass | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass index 59e5b60957..98538f783a 100644 --- a/eclass/cmake.eclass +++ b/eclass/cmake.eclass @@ -124,6 +124,12 @@ fi # read-only. This is a user flag and should under _no circumstances_ be set in # the ebuild. Helps in improving QA of build systems that write to source tree. +# @ECLASS_VARIABLE: CMAKE_SKIP_TESTS +# @USER_VARIABLE +# @DEFAULT_UNSET +# @DESCRIPTION: +# Array of tests that should be skipped when running CTest. + [[ ${CMAKE_MIN_VERSION} ]] && die "CMAKE_MIN_VERSION is banned; if necessary, set BDEPEND=\">=dev-util/cmake-${CMAKE_MIN_VERSION}\" directly" [[ ${CMAKE_BUILD_DIR} ]] && die "The ebuild must be migrated to BUILD_DIR" [[ ${CMAKE_REMOVE_MODULES} ]] && die "CMAKE_REMOVE_MODULES is banned, set CMAKE_REMOVE_MODULES_LIST array instead" @@ -673,6 +679,7 @@ cmake_src_test() { [[ -e CTestTestfile.cmake ]] || { echo "No tests found. Skipping."; return 0 ; } [[ -n ${TEST_VERBOSE} ]] && myctestargs+=( --extra-verbose --output-on-failure ) + [[ -n ${CMAKE_SKIP_TESTS} ]] && myctestargs+=( -E '('$( IFS='|'; echo "${CMAKE_SKIP_TESTS[*]}")')' ) set -- ctest -j "$(makeopts_jobs "${MAKEOPTS}" 999)" \ --test-load "$(makeopts_loadavg)" "${myctestargs[@]}" "$@"
