commit: 41199d923f833398dd646284addb5573be8cfca7
Author: band-a-prend <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Fri Jun 7 20:58:29 2019 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jun 15 14:19:15 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41199d92
dev-util/scons: 3.0.5-r1 fix test exit status processing
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 <torokhov_s_a <AT> mail.ru>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
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 9535e3ef17c..e4524ab4aba 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() {