diff options
Diffstat (limited to 'dev-ros/gmapping/gmapping-9999.ebuild')
-rw-r--r-- | dev-ros/gmapping/gmapping-9999.ebuild | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/dev-ros/gmapping/gmapping-9999.ebuild b/dev-ros/gmapping/gmapping-9999.ebuild index 5fcdea266180..b68005106277 100644 --- a/dev-ros/gmapping/gmapping-9999.ebuild +++ b/dev-ros/gmapping/gmapping-9999.ebuild @@ -23,4 +23,39 @@ RDEPEND=" " DEPEND="${RDEPEND} dev-ros/nav_msgs[${CATKIN_MESSAGES_CXX_USEDEP}] - dev-ros/rostest" + test? ( + dev-ros/rostest + dev-cpp/gtest + ) +" +TEST_DATA=" + basic_localization_stage_indexed.bag + hallway_slow_2011-03-04-21-41-33.bag + basic_localization_stage_groundtruth.pgm +" +PERCEPTION_TEST_DATA=" + test_replay_crash.bag + test_turtlebot.bag + test_upside_down.bag +" +SRC_URI="${SRC_URI} test? ( " +for i in ${TEST_DATA}; do + SRC_URI="${SRC_URI} http://download.ros.org/data/gmapping/${i} -> ${P}-${i}" +done +for i in ${PERCEPTION_TEST_DATA}; do + SRC_URI="${SRC_URI} https://github.com/ros-perception/slam_gmapping_test_data/raw/master/${i} -> ${P}-${i}" +done +SRC_URI="${SRC_URI} )" + +src_prepare() { + ros-catkin_src_prepare + if use test; then + for i in ${TEST_DATA} ${PERCEPTION_TEST_DATA}; do + cp "${DISTDIR}/${P}-${i}" "${S}/${i}" || die + done + sed \ + -e "s#http://download.ros.org/data/gmapping#file://${S}#" \ + -e "s#https://github.com/ros-perception/slam_gmapping_test_data/raw/master#file://${S}#" \ + -i CMakeLists.txt || die + fi +} |