diff options
author | Andreas Sturmlechner <andreas.sturmlechner@gmail.com> | 2016-08-21 20:23:47 +0200 |
---|---|---|
committer | Michael Palimaka <kensington@gentoo.org> | 2016-09-01 00:23:26 +1000 |
commit | 982606d3f67f1f3aed8388022cba0b1d8a8e4cb5 (patch) | |
tree | 66a3cdbb28266c3608e7b71fe2289e3c282f57a0 /eclass/kde5.eclass | |
parent | kde5-functions.eclass: Make punt_bogus_dep detect !CMakeLists.txt (diff) | |
download | gentoo-982606d3f67f1f3aed8388022cba0b1d8a8e4cb5.tar.gz gentoo-982606d3f67f1f3aed8388022cba0b1d8a8e4cb5.tar.bz2 gentoo-982606d3f67f1f3aed8388022cba0b1d8a8e4cb5.zip |
kde5.eclass: Add KDE_TEST="forceoptional-recursive" handling
Prime example: dev-util/kdevplatform with 24 test* subdirs
Diffstat (limited to 'eclass/kde5.eclass')
-rw-r--r-- | eclass/kde5.eclass | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass index 4fc4b1aa0d4d..1d093b1ecbb7 100644 --- a/eclass/kde5.eclass +++ b/eclass/kde5.eclass @@ -91,8 +91,10 @@ EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_ # For any other value, add test to IUSE and add a dependency on dev-qt/qttest:5. # If set to "optional", configure with -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON # when USE=!test. -# If set to "forceoptional", remove a Qt5Test dependency from the root -# CMakeLists.txt in addition to the above. +# If set to "forceoptional", remove a Qt5Test dependency and comment test +# subdirs from the root CMakeLists.txt in addition to the above. +# If set to "forceoptional-recursive", remove a Qt5Test dependency and comment +# test subdirs from *any* CMakeLists.txt in addition to the above. if [[ ${CATEGORY} = kde-frameworks ]]; then : ${KDE_TEST:=true} else @@ -487,13 +489,17 @@ EOF if [[ ${KDE_TEST} = forceoptional ]] ; then punt_bogus_dep Qt5 Test # if forceoptional, also cover non-kde categories - cmake_comment_add_subdirectory autotests - cmake_comment_add_subdirectory test - cmake_comment_add_subdirectory tests + cmake_comment_add_subdirectory autotests test tests + elif [[ ${KDE_TEST} = forceoptional-recursive ]] ; then + local d + for d in $(find . -type d -name "autotests" -or -name "tests" -or -name "test"); do + pushd ${d%/*} > /dev/null || die + punt_bogus_dep Qt5 Test + cmake_comment_add_subdirectory autotests test tests + popd > /dev/null || die + done elif [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma || ${CATEGORY} = kde-apps ]] ; then - cmake_comment_add_subdirectory autotests - cmake_comment_add_subdirectory test - cmake_comment_add_subdirectory tests + cmake_comment_add_subdirectory autotests test tests fi fi } |