From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CF6E615800A for ; Tue, 22 Aug 2023 17:12:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BD1A42BC02F; Tue, 22 Aug 2023 17:12:17 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 303C92BC020 for ; Tue, 22 Aug 2023 17:12:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5B7633412A2 for ; Tue, 22 Aug 2023 17:12:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AECC21045 for ; Tue, 22 Aug 2023 17:12:13 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1692724119.84b8266d0423caa790474e031d5def9ad4b8bd0e.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/cmake.eclass X-VCS-Directories: eclass/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 84b8266d0423caa790474e031d5def9ad4b8bd0e X-VCS-Branch: master Date: Tue, 22 Aug 2023 17:12:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 27c5e609-5d83-4e16-a31f-b95ae501bbe4 X-Archives-Hash: 18a4c2a645aa8b00efda1dbbee2f0037 commit: 84b8266d0423caa790474e031d5def9ad4b8bd0e Author: Alfred Persson Forsberg catcream org> AuthorDate: Wed Aug 24 02:16:50 2022 +0000 Commit: Sam James gentoo org> CommitDate: Tue Aug 22 17:08:39 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84b8266d cmake.eclass: add CMAKE_SKIP_TESTS Signed-off-by: Alfred Persson Forsberg catcream.org> Closes: https://github.com/gentoo/gentoo/pull/27052 Signed-off-by: Sam James gentoo.org> eclass/cmake.eclass | 7 +++++++ 1 file changed, 7 insertions(+) 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[@]}" "$@"