summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2021-10-04 16:40:28 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2021-10-04 17:21:43 +0300
commita14fe43dc734c48823b95db6096d7a3a30895202 (patch)
treedc14f3670fd6ee2f8d9f7acc040290b794f7506d
parentdev-util/rosdep: enable py3.10 (diff)
downloadgentoo-a14fe43dc734c48823b95db6096d7a3a30895202.tar.gz
gentoo-a14fe43dc734c48823b95db6096d7a3a30895202.tar.bz2
gentoo-a14fe43dc734c48823b95db6096d7a3a30895202.zip
dev-util/rosdep: cleanup tests
- Use new feature of PROPERTIES="test_network" - use cleaner unset ROS_DISTRO Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r--dev-util/rosdep/rosdep-0.21.0.ebuild19
-rw-r--r--dev-util/rosdep/rosdep-9999.ebuild19
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 8e8c536d3554..12ed94c4c914 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 8e8c536d3554..12ed94c4c914 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() {