diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template index 782a6270a62..c8918a7a798 100644 --- a/srcpkgs/coreutils/template +++ b/srcpkgs/coreutils/template @@ -11,6 +11,7 @@ homepage="http://www.gnu.org/software/coreutils" license="GPL-3" distfiles="${GNU_SITE}/coreutils/coreutils-${version}.tar.xz" checksum=1117b1a16039ddd84d51a9923948307cfa28c2cea03d1a2438742253df0a0c65 +make_check_args="RUN_EXPENSIVE_TESTS=1" if [ "$CHROOT_READY" ]; then hostmakedepends="perl" @@ -76,28 +77,28 @@ do_build() { make ${makejobs} } -do_check() { +pre_check() { # chgrp tests fail inside a chroot sed -i '/tests\/chgrp/d' Makefile - # tests that fail inside a chroot - sed -i '/test-fchownat$(EXEEXT)/d' gnulib-tests/Makefile - sed -i '/test-chown$(EXEEXT)/d' gnulib-tests/Makefile - sed -i '/test-lchown$(EXEEXT)/d' gnulib-tests/Makefile + exeext_tests="fchownat chown lchown chdir canonizalize calloc-gnu" + sh_tests="c-strcase" - # Requires test-chown which fails on chroot ( see above ) - sed -i '/test-chdir$(EXEEXT)/d' gnulib-tests/Makefile + case "$XBPS_TARGET_MACHINE" in + *-musl* ) + # Disable locale tests that fail on musl + exeext_tests+=" localename getlogin getcwd" + sh_tests+=" mbrtowc5" + ;; + esac - # Requires test-chdir which is disable due to test-chown failure - sed -i '/test-canonicalize$(EXEEXT)/d' gnulib-tests/Makefile + for test in $exeext_tests ; do + sed -i "/test-$test\$(EXEEXT)/d" gnulib-tests/Makefile + done - # Requires test-canonicalize which is disable due to test-chdir being - # disable due to test-chown failure - sed -i '/test-calloc-gnu$(EXEEXT)/d' gnulib-tests/Makefile - - sed -i '/test-c-strcase.sh/d' gnulib-tests/Makefile - - make RUN_EXPENSIVE_TESTS=1 check + for test in $sh_tests ; do + sed -i "/test-$test.sh/d" gnulib-tests/Makefile + done } do_install() {