public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] cmake.eclass: add CMAKE_SKIP_TESTS
@ 2023-08-20  5:44 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2023-08-20  5:44 UTC (permalink / raw
  To: gentoo-dev; +Cc: base-system, kde, ionen, Alfred Persson Forsberg, Sam James

From: Alfred Persson Forsberg <cat@catcream.org>

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>
---
 eclass/cmake.eclass | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index 16b3e300ccae0..fb3f9b6352be2 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[@]}" "$@"
-- 
2.41.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-20  5:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-20  5:44 [gentoo-dev] [PATCH] cmake.eclass: add CMAKE_SKIP_TESTS Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox