diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2011-08-21 21:19:08 +0000 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2011-08-21 21:19:08 +0000 |
commit | 42a22d628394e25fcbdbe43cebdbf7b82121dab3 (patch) | |
tree | 939fe429801aa06126c401ff1c67f7d674d9f1b6 /eclass | |
parent | Introduce the first ebuild for tinynotify-send. (diff) | |
download | gentoo-2-42a22d628394e25fcbdbe43cebdbf7b82121dab3.tar.gz gentoo-2-42a22d628394e25fcbdbe43cebdbf7b82121dab3.tar.bz2 gentoo-2-42a22d628394e25fcbdbe43cebdbf7b82121dab3.zip |
Add undocumented variable such that in case of test failures the test log is
inserted into the build log. On request from Diego.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/cmake-utils.eclass | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index db9e48913d0a..c903f9167a38 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.71 2011/08/20 21:43:25 dilfridge Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.72 2011/08/21 21:19:08 dilfridge Exp $ # @ECLASS: cmake-utils.eclass # @MAINTAINER: @@ -439,7 +439,21 @@ enable_cmake-utils_src_test() { [[ -e CTestTestfile.cmake ]] || { echo "No tests found. Skipping."; return 0 ; } [[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure" - ctest ${ctestargs} "$@" || die "Tests failed. When you file a bug, please attach the following file: \n\t${CMAKE_BUILD_DIR}/Testing/Temporary/LastTest.log" + + if ctest ${ctestargs} "$@" ; then + einfo "Tests succeeded." + else + if [[ -n "${CMAKE_YES_I_WANT_TO_SEE_THE_TEST_LOG}" ]] ; then + # on request from Diego + eerror "Tests failed. Test log ${CMAKE_BUILD_DIR}/Testing/Temporary/LastTest.log follows:" + eerror "--START TEST LOG--------------------------------------------------------------" + cat "${CMAKE_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${CMAKE_BUILD_DIR}/Testing/Temporary/LastTest.log" + fi + fi popd > /dev/null } |