From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 798701380DC for ; Wed, 5 Feb 2014 14:24:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A0B33E0BF7; Wed, 5 Feb 2014 14:24:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1CE97E0BF7 for ; Wed, 5 Feb 2014 14:24:00 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BC79933F931 for ; Wed, 5 Feb 2014 14:23:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id E5A7118278 for ; Wed, 5 Feb 2014 14:23:56 +0000 (UTC) From: "Michael Palimaka" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Palimaka" Message-ID: <1391610226.0836e9145e25c82efe722b331a4b1579615cc319.kensington@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: eclass/ X-VCS-Repository: proj/kde X-VCS-Files: eclass/cmake-utils.eclass X-VCS-Directories: eclass/ X-VCS-Committer: kensington X-VCS-Committer-Name: Michael Palimaka X-VCS-Revision: 0836e9145e25c82efe722b331a4b1579615cc319 X-VCS-Branch: master Date: Wed, 5 Feb 2014 14:23:56 +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-Archives-Salt: 08bfc815-6138-4329-b128-1d3f3323d5f6 X-Archives-Hash: 71a947aa3623ab83d333d5f16f8d64b2 commit: 0836e9145e25c82efe722b331a4b1579615cc319 Author: Michael Palimaka gentoo org> AuthorDate: Wed Feb 5 14:23:46 2014 +0000 Commit: Michael Palimaka gentoo org> CommitDate: Wed Feb 5 14:23:46 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=0836e914 [eclass] src_test comes before src_install --- eclass/cmake-utils.eclass | 76 +++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index 31f41c5..180c370 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -595,6 +595,37 @@ cmake-utils_src_make() { popd > /dev/null } +enable_cmake-utils_src_test() { + debug-print-function ${FUNCNAME} "$@" + + _check_build_dir + pushd "${BUILD_DIR}" > /dev/null + [[ -e CTestTestfile.cmake ]] || { echo "No tests found. Skipping."; return 0 ; } + + [[ -n ${TEST_VERBOSE} ]] && myctestargs+=( --extra-verbose --output-on-failure ) + + if ctest "${myctestargs[@]}" "$@" ; then + einfo "Tests succeeded." + popd > /dev/null + return 0 + else + if [[ -n "${CMAKE_YES_I_WANT_TO_SEE_THE_TEST_LOG}" ]] ; then + # on request from Diego + eerror "Tests failed. Test log ${BUILD_DIR}/Testing/Temporary/LastTest.log follows:" + eerror "--START TEST LOG--------------------------------------------------------------" + cat "${BUILD_DIR}/Testing/Temporary/LastTest.log" + eerror "--END TEST LOG----------------------------------------------------------------" + die "Tests failed." + else + die "Tests failed. When you file a bug, please attach the following file: \n\t${BUILD_DIR}/Testing/Temporary/LastTest.log" + fi + + # die might not die due to nonfatal + popd > /dev/null + return 1 + fi +} + enable_cmake-utils_src_install() { debug-print-function ${FUNCNAME} "$@" @@ -631,37 +662,6 @@ enable_cmake-utils_src_install() { popd > /dev/null } -enable_cmake-utils_src_test() { - debug-print-function ${FUNCNAME} "$@" - - _check_build_dir - pushd "${BUILD_DIR}" > /dev/null - [[ -e CTestTestfile.cmake ]] || { echo "No tests found. Skipping."; return 0 ; } - - [[ -n ${TEST_VERBOSE} ]] && myctestargs+=( --extra-verbose --output-on-failure ) - - if ctest "${myctestargs[@]}" "$@" ; then - einfo "Tests succeeded." - popd > /dev/null - return 0 - else - if [[ -n "${CMAKE_YES_I_WANT_TO_SEE_THE_TEST_LOG}" ]] ; then - # on request from Diego - eerror "Tests failed. Test log ${BUILD_DIR}/Testing/Temporary/LastTest.log follows:" - eerror "--START TEST LOG--------------------------------------------------------------" - cat "${BUILD_DIR}/Testing/Temporary/LastTest.log" - eerror "--END TEST LOG----------------------------------------------------------------" - die "Tests failed." - else - die "Tests failed. When you file a bug, please attach the following file: \n\t${BUILD_DIR}/Testing/Temporary/LastTest.log" - fi - - # die might not die due to nonfatal - popd > /dev/null - return 1 - fi -} - # @FUNCTION: cmake-utils_src_prepare # @DESCRIPTION: # Apply ebuild and user patches. @@ -685,13 +685,6 @@ cmake-utils_src_compile() { _execute_optionaly "src_compile" "$@" } -# @FUNCTION: cmake-utils_src_install -# @DESCRIPTION: -# Function for installing the package. Automatically detects the build type. -cmake-utils_src_install() { - _execute_optionaly "src_install" "$@" -} - # @FUNCTION: cmake-utils_src_test # @DESCRIPTION: # Function for testing the package. Automatically detects the build type. @@ -699,6 +692,13 @@ cmake-utils_src_test() { _execute_optionaly "src_test" "$@" } +# @FUNCTION: cmake-utils_src_install +# @DESCRIPTION: +# Function for installing the package. Automatically detects the build type. +cmake-utils_src_install() { + _execute_optionaly "src_install" "$@" +} + # Optionally executes phases based on WANT_CMAKE variable/USE flag. _execute_optionaly() { local phase="$1" ; shift