commit: a14fe43dc734c48823b95db6096d7a3a30895202
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 4 13:40:28 2021 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 4 14:21:43 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a14fe43d
dev-util/rosdep: cleanup tests
- Use new feature of PROPERTIES="test_network"
- use cleaner unset ROS_DISTRO
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
dev-util/rosdep/rosdep-0.21.0.ebuild | 19 +++++++++----------
dev-util/rosdep/rosdep-9999.ebuild | 19 +++++++++----------
2 files changed, 18 insertions(+), 20 deletions(-)
diff --git a/dev-util/rosdep/rosdep-0.21.0.ebuild
b/dev-util/rosdep/rosdep-0.21.0.ebuild
index 8e8c536d355..12ed94c4c91 100644
--- a/dev-util/rosdep/rosdep-0.21.0.ebuild
+++ b/dev-util/rosdep/rosdep-0.21.0.ebuild
@@ -26,17 +26,17 @@ fi
LICENSE="BSD"
SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
+
+# Tests need network
+RESTRICT="test"
+PROPERTIES="test_network"
RDEPEND="
dev-python/catkin_pkg[${PYTHON_USEDEP}]
dev-python/rospkg[${PYTHON_USEDEP}]
dev-python/rosdistro[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}"
BDEPEND="
- dev-python/nose[${PYTHON_USEDEP}]
test? (
dev-python/mock[${PYTHON_USEDEP}]
dev-python/flake8[${PYTHON_USEDEP}]
@@ -44,12 +44,11 @@ BDEPEND="
"
PATCHES=( "${FILESDIR}/tests.patch" )
-python_test() {
- if has network-sandbox ${FEATURES}; then
- einfo "Skipping tests due to network sandbox"
- else
- env -u ROS_DISTRO nosetests --with-xunit test || die
- fi
+distutils_enable_tests nose
+
+src_test() {
+ unset ROS_DISTRO
+ distutils-r1_src_test
}
pkg_postrm() {
diff --git a/dev-util/rosdep/rosdep-9999.ebuild
b/dev-util/rosdep/rosdep-9999.ebuild
index 8e8c536d355..12ed94c4c91 100644
--- a/dev-util/rosdep/rosdep-9999.ebuild
+++ b/dev-util/rosdep/rosdep-9999.ebuild
@@ -26,17 +26,17 @@ fi
LICENSE="BSD"
SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
+
+# Tests need network
+RESTRICT="test"
+PROPERTIES="test_network"
RDEPEND="
dev-python/catkin_pkg[${PYTHON_USEDEP}]
dev-python/rospkg[${PYTHON_USEDEP}]
dev-python/rosdistro[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}"
BDEPEND="
- dev-python/nose[${PYTHON_USEDEP}]
test? (
dev-python/mock[${PYTHON_USEDEP}]
dev-python/flake8[${PYTHON_USEDEP}]
@@ -44,12 +44,11 @@ BDEPEND="
"
PATCHES=( "${FILESDIR}/tests.patch" )
-python_test() {
- if has network-sandbox ${FEATURES}; then
- einfo "Skipping tests due to network sandbox"
- else
- env -u ROS_DISTRO nosetests --with-xunit test || die
- fi
+distutils_enable_tests nose
+
+src_test() {
+ unset ROS_DISTRO
+ distutils-r1_src_test
}
pkg_postrm() {