summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2017-02-23 10:15:38 +0100
committerAlexis Ballier <aballier@gentoo.org>2017-02-23 10:15:55 +0100
commitb3bb96005ba242296d4c2d8458853738b4062212 (patch)
treea7de8b9bc29b67c0a4ceb0227d372b44550b7781 /eclass
parentdev-ros/rosmake: Add python 3.5 support. (diff)
downloadgentoo-b3bb96005ba242296d4c2d8458853738b4062212.tar.gz
gentoo-b3bb96005ba242296d4c2d8458853738b4062212.tar.bz2
gentoo-b3bb96005ba242296d4c2d8458853738b4062212.zip
eclass/ros-catkin.eclass: Regenerate devel environment before running tests. PYTHONPATH is not set properly otherwise and we end up testing the installed version, not the version we just built.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ros-catkin.eclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/eclass/ros-catkin.eclass b/eclass/ros-catkin.eclass
index 93086aa123a7..a90a8da03a35 100644
--- a/eclass/ros-catkin.eclass
+++ b/eclass/ros-catkin.eclass
@@ -218,6 +218,11 @@ ros-catkin_src_compile() {
# Decorator around cmake-utils_src_test to ensure tests are built before running them.
ros-catkin_src_test_internal() {
cd "${BUILD_DIR}" || die
+ # Regenerate env for tests, PYTHONPATH is not set properly otherwise...
+ if [ -f catkin_generated/generate_cached_setup.py ] ; then
+ einfo "Regenerating setup_cached.sh for tests"
+ ${PYTHON:-python} catkin_generated/generate_cached_setup.py || die
+ fi
# Using cmake-utils_src_make with nonfatal does not work and breaks e.g.
# dev-ros/rviz.
if nonfatal emake tests -n &> /dev/null ; then