Gentoo Archives: gentoo-commits

From: Michael Palimaka <kensington@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Wed, 31 Aug 2016 14:24:00
Message-Id: 1472653406.982606d3f67f1f3aed8388022cba0b1d8a8e4cb5.kensington@gentoo
1 commit: 982606d3f67f1f3aed8388022cba0b1d8a8e4cb5
2 Author: Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
3 AuthorDate: Sun Aug 21 18:23:47 2016 +0000
4 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 31 14:23:26 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=982606d3
7
8 kde5.eclass: Add KDE_TEST="forceoptional-recursive" handling
9
10 Prime example: dev-util/kdevplatform with 24 test* subdirs
11
12 eclass/kde5.eclass | 22 ++++++++++++++--------
13 1 file changed, 14 insertions(+), 8 deletions(-)
14
15 diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
16 index 4fc4b1a..1d093b1 100644
17 --- a/eclass/kde5.eclass
18 +++ b/eclass/kde5.eclass
19 @@ -91,8 +91,10 @@ EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_
20 # For any other value, add test to IUSE and add a dependency on dev-qt/qttest:5.
21 # If set to "optional", configure with -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON
22 # when USE=!test.
23 -# If set to "forceoptional", remove a Qt5Test dependency from the root
24 -# CMakeLists.txt in addition to the above.
25 +# If set to "forceoptional", remove a Qt5Test dependency and comment test
26 +# subdirs from the root CMakeLists.txt in addition to the above.
27 +# If set to "forceoptional-recursive", remove a Qt5Test dependency and comment
28 +# test subdirs from *any* CMakeLists.txt in addition to the above.
29 if [[ ${CATEGORY} = kde-frameworks ]]; then
30 : ${KDE_TEST:=true}
31 else
32 @@ -487,13 +489,17 @@ EOF
33 if [[ ${KDE_TEST} = forceoptional ]] ; then
34 punt_bogus_dep Qt5 Test
35 # if forceoptional, also cover non-kde categories
36 - cmake_comment_add_subdirectory autotests
37 - cmake_comment_add_subdirectory test
38 - cmake_comment_add_subdirectory tests
39 + cmake_comment_add_subdirectory autotests test tests
40 + elif [[ ${KDE_TEST} = forceoptional-recursive ]] ; then
41 + local d
42 + for d in $(find . -type d -name "autotests" -or -name "tests" -or -name "test"); do
43 + pushd ${d%/*} > /dev/null || die
44 + punt_bogus_dep Qt5 Test
45 + cmake_comment_add_subdirectory autotests test tests
46 + popd > /dev/null || die
47 + done
48 elif [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma || ${CATEGORY} = kde-apps ]] ; then
49 - cmake_comment_add_subdirectory autotests
50 - cmake_comment_add_subdirectory test
51 - cmake_comment_add_subdirectory tests
52 + cmake_comment_add_subdirectory autotests test tests
53 fi
54 fi
55 }