From 41199d923f833398dd646284addb5573be8cfca7 Mon Sep 17 00:00:00 2001 From: band-a-prend Date: Fri, 7 Jun 2019 23:58:29 +0300 Subject: [PATCH] dev-util/scons: 3.0.5-r1 fix test exit status processing MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 1. The RESTRICT="test" is replaced with RESTRICT="!test? ( test )" 2. DEPEND "test" condition is added for dev-libs/libxml2[${PYTHON_USEDEP}] and dev-python/lxml[${PYTHON_USEDEP}] to provide similar test results for all python bindings for all tests there it is possible. 3. Test exit status processing of runtest.py results within python_test() is fixed to avoid failure if there are no FAILED tests. The Scons runtest.py script returns 0 if all tests are passed and returns 2 if there are any "no result" tests. If failed tests exist then 1 returns. Signed-off-by: Sergey Torokhov Signed-off-by: Michał Górny --- dev-util/scons/scons-3.0.5-r1.ebuild | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/dev-util/scons/scons-3.0.5-r1.ebuild b/dev-util/scons/scons-3.0.5-r1.ebuild index 9535e3ef17c0..e4524ab4aba5 100644 --- a/dev-util/scons/scons-3.0.5-r1.ebuild +++ b/dev-util/scons/scons-3.0.5-r1.ebuild @@ -20,8 +20,14 @@ LICENSE="MIT" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" IUSE="doc test" -# unresolved & unpredictable test failures -RESTRICT="test" +RESTRICT="!test? ( test )" + +DEPEND=" + test? ( + dev-libs/libxml2[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + ) +" S=${WORKDIR}/${P}/src @@ -60,10 +66,14 @@ src_prepare() { python_test() { cd "${WORKDIR}/${P}" || die - "${EPYTHON}" runtest.py -as \ + "${EPYTHON}" runtest.py -a --passed \ -j "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" \ - --builddir "${BUILD_DIR}/lib" || - die "Tests fail with ${EPYTHON}" + --builddir "${BUILD_DIR}/lib" + + # runtest.py script returns "0" if all tests are passed + # and returns "2" if there are any tests with "no result" + # (i.e. in case if some tools are not installed or it's Windows specific tests) + [[ ${?} == [02] ]] || die "Tests fail with ${EPYTHON}" } python_install_all() { -- 2.26.2