diff options
Diffstat (limited to 'dev-libs/klibc/klibc-1.5.12-r1.ebuild')
-rw-r--r-- | dev-libs/klibc/klibc-1.5.12-r1.ebuild | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/dev-libs/klibc/klibc-1.5.12-r1.ebuild b/dev-libs/klibc/klibc-1.5.12-r1.ebuild index a7c193347603..cc5badd305a1 100644 --- a/dev-libs/klibc/klibc-1.5.12-r1.ebuild +++ b/dev-libs/klibc/klibc-1.5.12-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/klibc/klibc-1.5.12-r1.ebuild,v 1.2 2008/10/31 21:32:22 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/klibc/klibc-1.5.12-r1.ebuild,v 1.3 2008/10/31 22:00:19 robbat2 Exp $ # Robin H. Johnson <robbat2@gentoo.org>, 12 Nov 2007: # This still needs major work. @@ -119,7 +119,7 @@ kernel_asm_arch() { } src_compile() { - local myargs + local myargs="all" local myARCH="${ARCH}" myABI="${ABI}" # TODO: For cross-compiling # You should set ARCH and ABI here @@ -141,6 +141,7 @@ src_compile() { cd "${S}" use debug && myargs="${myargs} V=1" + has test $FEATURES && myargs="${myargs} test" emake \ EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ @@ -240,3 +241,28 @@ src_install() { ln -snf asm-${KLIBCASMARCH} "${linkname}" fi } + +src_test() { + if ! tc-is-cross-compiler ; then + cd "${S}"/usr/klibc/tests + ALL_TESTS="$(ls *.c |sed 's,\.c$,,g')" + BROKEN_TESTS="idtest fcntl fnmatch testrand48" + failed=0 + for t in $ALL_TESTS ; do + if has $t $BROKEN_TESTS ; then + echo "=== $t SKIP" + else + echo -n "=== $t " + ./$t </dev/null >/dev/null + rc=$? + if [ $rc -eq 0 ]; then + echo PASS + else + echo FAIL + failed=1 + fi + fi + done + [ $failed -ne 0 ] && die "Some tests failed." + fi +} |