dev-python/clang-python: Fix handling test failures
authorMichał Górny <mgorny@gentoo.org>
Wed, 6 Jun 2018 08:17:20 +0000 (10:17 +0200)
committerMichał Górny <mgorny@gentoo.org>
Wed, 6 Jun 2018 08:23:08 +0000 (10:23 +0200)
Fix handling test failurse to die on any implementation failing, rather
than only on the last one tested.

dev-python/clang-python/clang-python-5.0.2.ebuild
dev-python/clang-python/clang-python-6.0.0.ebuild
dev-python/clang-python/clang-python-6.0.9999.ebuild
dev-python/clang-python/clang-python-9999.ebuild

index f60acf5217fa24196b31ad76ed9709bebbd19815..4331a4a3bf5f66c1e319b6dc3da2123220c1730c 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -34,8 +34,12 @@ src_unpack() {
        tar -xJf "${DISTDIR}/${MY_P}.tar.xz" "${MY_P}/bindings/python" || die
 }
 
+python_test() {
+       nosetests -v || die "Tests fail with ${EPYTHON}"
+}
+
 src_test() {
-       python_foreach_impl nosetests -v || die
+       python_foreach_impl python_test
 }
 
 src_install() {
index 6abf574e9b931f0557cd0f122be3785a2fc9b3ef..5d6eaf45c6cd79a6c18e47df6be32c70b6e5a262 100644 (file)
@@ -34,8 +34,12 @@ src_unpack() {
        tar -xJf "${DISTDIR}/${MY_P}.tar.xz" "${MY_P}/bindings/python" || die
 }
 
+python_test() {
+       "${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}"
+}
+
 src_test() {
-       python_foreach_impl python -m unittest discover -v || die
+       python_foreach_impl python_test
 }
 
 src_install() {
index e0aa3318ebd93fc7eef679ccd6ca61b53337e0c3..89b1f72d475da2201a90a58c940eea43a7543b23 100644 (file)
@@ -36,8 +36,12 @@ src_unpack() {
        git-r3_checkout '' '' '' bindings/python
 }
 
+python_test() {
+       "${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}"
+}
+
 src_test() {
-       python_foreach_impl python -m unittest discover -v || die
+       python_foreach_impl python_test
 }
 
 src_install() {
index 0e636d4e4c11cd32f36390c947535266a55d2b1f..cf488945799b7fb05035fc5a4fa5c1b696401b51 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -35,8 +35,12 @@ src_unpack() {
        git-r3_checkout '' '' '' bindings/python
 }
 
+python_test() {
+       "${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}"
+}
+
 src_test() {
-       python_foreach_impl python -m unittest discover -v || die
+       python_foreach_impl python_test
 }
 
 src_install() {