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
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() {