summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred Persson Forsberg <cat@catcream.org>2022-08-24 02:16:50 +0000
committerSam James <sam@gentoo.org>2023-08-22 18:08:39 +0100
commit84b8266d0423caa790474e031d5def9ad4b8bd0e (patch)
treeae5182a25551115a423d63165cc7f7f3f5979439 /eclass/cmake.eclass
parentdev-python/structlog: Keyword 23.1.0 arm64, #912839 (diff)
downloadgentoo-84b8266d0423caa790474e031d5def9ad4b8bd0e.tar.gz
gentoo-84b8266d0423caa790474e031d5def9ad4b8bd0e.tar.bz2
gentoo-84b8266d0423caa790474e031d5def9ad4b8bd0e.zip
cmake.eclass: add CMAKE_SKIP_TESTS
Signed-off-by: Alfred Persson Forsberg <cat@catcream.org> Closes: https://github.com/gentoo/gentoo/pull/27052 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/cmake.eclass')
-rw-r--r--eclass/cmake.eclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index 16b3e300ccae..fb3f9b6352be 100644
--- a/eclass/cmake.eclass
+++ b/eclass/cmake.eclass
@@ -125,6 +125,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"
@@ -681,6 +687,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[@]}" "$@"