diff options
Diffstat (limited to 'sys-libs/glibc/files')
-rw-r--r-- | sys-libs/glibc/files/eblits/src_test.eblit | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/sys-libs/glibc/files/eblits/src_test.eblit b/sys-libs/glibc/files/eblits/src_test.eblit index edcdac71de99..532bc8ce0911 100644 --- a/sys-libs/glibc/files/eblits/src_test.eblit +++ b/sys-libs/glibc/files/eblits/src_test.eblit @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_test.eblit,v 1.4 2010/08/10 08:08:05 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_test.eblit,v 1.5 2013/04/11 20:42:56 vapier Exp $ toolchain-glibc_src_test() { cd "${WORKDIR}"/build-${ABI}-${CTARGET}-$1 || die "cd build-${ABI}-${CTARGET}-$1" @@ -17,6 +17,14 @@ eblit-glibc-src_test() { setup_env + _maybe_die() { + if [[ -n ${OABI} ]] ; then + return ${ret} + elif [[ ${ret} -ne 0 ]] ; then + die "tests failed" + fi + } + # give tests more time to complete export TIMEOUTFACTOR=5 @@ -26,17 +34,23 @@ eblit-glibc-src_test() { for ABI in $(get_install_abis) ; do export ABI einfo " Testing ${ABI} glibc" - src_test - ((ret+=$?)) + eblit-glibc-src_test + : $(( ret += $? )) done ABI=${OABI} unset OABI - [[ ${ret} -ne 0 ]] \ - && die "tests failed" \ - || return 0 + + _maybe_die + return fi - want_linuxthreads && toolchain-glibc_src_test linuxthreads ; ((ret+=$?)) - want_nptl && toolchain-glibc_src_test nptl ; ((ret+=$?)) - return ${ret} + local t + for t in linuxthreads nptl ; do + if want_${t} ; then + toolchain-glibc_src_test ${t} + : $(( ret += $? )) + fi + done + _maybe_die + return } |