Skip to content

Commit

Permalink
Merge pull request #437 from k-okada/fix_rosdep
Browse files Browse the repository at this point in the history
add test to check if rosdep correctly install python-lxml, see ros/rosdistro#31569
  • Loading branch information
k-okada authored Dec 29, 2021
2 parents 5e0ae4e + b4569b8 commit 3840077
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ if(CATKIN_ENABLE_TESTING)
# Check if rosdep is correctly install scipy
if ("$ENV{ROS_DISTRO}" STRGREATER "hydro") # hydro does not install pip scipy
catkin_add_nosetests(test/test_scipy.py)
catkin_add_nosetests(test/test_lxml.py)
endif()
endif()

Expand Down
2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<build_depend condition="$ROS_PYTHON_VERSION == 3">python3</build_depend>
<build_depend condition="$ROS_PYTHON_VERSION == 2">python-scipy</build_depend>
<build_depend condition="$ROS_PYTHON_VERSION == 3">python3-scipy</build_depend>
<build_depend condition="$ROS_PYTHON_VERSION == 2">python-lxml</build_depend>
<build_depend condition="$ROS_PYTHON_VERSION == 3">python3-lxml</build_depend>
<build_depend>catkin</build_depend>
<build_depend>rostest</build_depend>
<test_depend>rospy_tutorials</test_depend>
Expand Down
18 changes: 18 additions & 0 deletions test/test_lxml.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import print_function

import sys
import unittest

class TestLexml(unittest.TestCase):

def test_lxml(self):

import lxml
print(lxml)
self.assertTrue('true')

if __name__ == '__main__':
unittest.main()
7 changes: 7 additions & 0 deletions travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,13 @@ rosdep --version
if [ ! -e /etc/ros/rosdep/sources.list.d/20-default.list ]; then
sudo rosdep init
fi

# use snapshot of rosdep list
# https://github.com/ros/rosdistro/pull/31570#issuecomment-1000497517
if [[ "$ROS_DISTRO" =~ "hydro"|"indigo"|"jade"|"kinetic"|"lunar" ]]; then
sudo rm /etc/ros/rosdep/sources.list.d/20-default.list
sudo wget https://gist.githubusercontent.com/cottsay/b27a46e53b8f7453bf9ff637d32ea283/raw/476b3714bb90cfbc6b8b9d068162fc6408fa7f76/30-xenial.list -O /etc/ros/rosdep/sources.list.d/30-xenial.list
fi
ret=1
rosdep update --include-eol-distros|| while [ $ret != 0 ]; do sleep 1; rosdep update --include-eol-distros && ret=0 || echo "failed"; done

Expand Down

0 comments on commit 3840077

Please sign in to comment.