commit:     1008f6f4708fbf65de8f5f31775e655be48f509b
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  6 15:58:09 2020 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Thu Aug  6 16:09:02 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1008f6f4

dev-ros/robot_state_publisher: fix tests

Closes: https://bugs.gentoo.org/625136
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>

 dev-ros/robot_state_publisher/Manifest                 |  2 ++
 .../robot_state_publisher-1.15.1.ebuild                | 18 ++++++++++++++++++
 .../robot_state_publisher-9999.ebuild                  | 18 ++++++++++++++++++
 3 files changed, 38 insertions(+)

diff --git a/dev-ros/robot_state_publisher/Manifest 
b/dev-ros/robot_state_publisher/Manifest
index 9e4a0feea91..998e2eb1c68 100644
--- a/dev-ros/robot_state_publisher/Manifest
+++ b/dev-ros/robot_state_publisher/Manifest
@@ -1 +1,3 @@
+DIST robot_state_publisher-1.15.1-joint_states_indexed.bag 778888 BLAKE2B 
3d117e06712ed20f838be247057645799a8b8501ddc3582a0037d34a2da40b8390367de88bd278f05632f150e88139b34325be3d5a1ce44f7ad3ebfaffd5e0ac
 SHA512 
171e4eb810e12da4af5f9ce4f91bb6967e3895dfa284aa542010b7a7691571051e237ab96b055105f559e8d242099eb41f1429c5afcba13361ee58bdd565a689
 DIST robot_state_publisher-1.15.1.tar.gz 25717 BLAKE2B 
87f1e70f80cff01255840e99be9088bc1d91bc25f5b00d1e46b3ebed9b55bf24e5fa698b41cb4c3603ae7147191a3d39ca85b65469edffacfb91d7f913156268
 SHA512 
f36d07961c27c85b2787cc294ca10a7e1334e699db61926067aa0a9b1dcab0969a799feed6d2fa78d14ff76cf661d29479585d6f9ec660f94832e79d6c88ddf1
+DIST robot_state_publisher-9999-joint_states_indexed.bag 778888 BLAKE2B 
3d117e06712ed20f838be247057645799a8b8501ddc3582a0037d34a2da40b8390367de88bd278f05632f150e88139b34325be3d5a1ce44f7ad3ebfaffd5e0ac
 SHA512 
171e4eb810e12da4af5f9ce4f91bb6967e3895dfa284aa542010b7a7691571051e237ab96b055105f559e8d242099eb41f1429c5afcba13361ee58bdd565a689

diff --git a/dev-ros/robot_state_publisher/robot_state_publisher-1.15.1.ebuild 
b/dev-ros/robot_state_publisher/robot_state_publisher-1.15.1.ebuild
index b5b92efa90d..f61237cc28c 100644
--- a/dev-ros/robot_state_publisher/robot_state_publisher-1.15.1.ebuild
+++ b/dev-ros/robot_state_publisher/robot_state_publisher-1.15.1.ebuild
@@ -11,6 +11,11 @@ DESCRIPTION="Package for publishing the state of a robot to 
tf"
 LICENSE="BSD"
 SLOT="0"
 IUSE=""
+DATA="joint_states_indexed.bag"
+for i in ${DATA}; do
+       SRC_URI="${SRC_URI}
+               
http://wiki.ros.org/robot_state_publisher/data?action=AttachFile&do=get&target=${i}
 -> ${P}-${i}"
+done
 
 RDEPEND="
        dev-ros/kdl_parser
@@ -30,3 +35,16 @@ RDEPEND="
 DEPEND="${RDEPEND}
        test? ( dev-cpp/gtest dev-ros/rostest[${PYTHON_SINGLE_USEDEP}] )
 "
+
+src_prepare() {
+       ros-catkin_src_prepare
+       for i in ${DATA}; do
+               cp "${DISTDIR}/${P}-${i}" "${S}/${i}" || die
+       done
+       sed -e 
"s#http://wiki.ros.org/robot_state_publisher/data?action=AttachFile&do=get&target=#file://${S}#";
 -i CMakeLists.txt || die
+}
+
+src_test() {
+       export ROS_PACKAGE_PATH="${S}:${ROS_PACKAGE_PATH}"
+       ros-catkin_src_test
+}

diff --git a/dev-ros/robot_state_publisher/robot_state_publisher-9999.ebuild 
b/dev-ros/robot_state_publisher/robot_state_publisher-9999.ebuild
index b5b92efa90d..f61237cc28c 100644
--- a/dev-ros/robot_state_publisher/robot_state_publisher-9999.ebuild
+++ b/dev-ros/robot_state_publisher/robot_state_publisher-9999.ebuild
@@ -11,6 +11,11 @@ DESCRIPTION="Package for publishing the state of a robot to 
tf"
 LICENSE="BSD"
 SLOT="0"
 IUSE=""
+DATA="joint_states_indexed.bag"
+for i in ${DATA}; do
+       SRC_URI="${SRC_URI}
+               
http://wiki.ros.org/robot_state_publisher/data?action=AttachFile&do=get&target=${i}
 -> ${P}-${i}"
+done
 
 RDEPEND="
        dev-ros/kdl_parser
@@ -30,3 +35,16 @@ RDEPEND="
 DEPEND="${RDEPEND}
        test? ( dev-cpp/gtest dev-ros/rostest[${PYTHON_SINGLE_USEDEP}] )
 "
+
+src_prepare() {
+       ros-catkin_src_prepare
+       for i in ${DATA}; do
+               cp "${DISTDIR}/${P}-${i}" "${S}/${i}" || die
+       done
+       sed -e 
"s#http://wiki.ros.org/robot_state_publisher/data?action=AttachFile&do=get&target=#file://${S}#";
 -i CMakeLists.txt || die
+}
+
+src_test() {
+       export ROS_PACKAGE_PATH="${S}:${ROS_PACKAGE_PATH}"
+       ros-catkin_src_test
+}

Reply via email to