summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorband-a-prend <torokhov-s-a@yandex.ru>2019-06-07 23:58:29 +0300
committerMichał Górny <mgorny@gentoo.org>2019-06-15 16:19:15 +0200
commit41199d923f833398dd646284addb5573be8cfca7 (patch)
treef4202a988a80cc391d2f1c74ec764d5074a922c8 /dev-util/scons
parentdev-util/scons: init scons-3.0.5-r1.ebuild (diff)
downloadgentoo-41199d923f833398dd646284addb5573be8cfca7.tar.gz
gentoo-41199d923f833398dd646284addb5573be8cfca7.tar.bz2
gentoo-41199d923f833398dd646284addb5573be8cfca7.zip
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@mail.ru> Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-util/scons')
-rw-r--r--dev-util/scons/scons-3.0.5-r1.ebuild20
1 files 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() {