Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up Travis to run tests #8

Closed
wants to merge 4 commits into from

Conversation

ahendrix
Copy link
Contributor

No description provided.

@ahendrix
Copy link
Contributor Author

The downstream tests are failing because they're broken.

@efernandez
Copy link

@ahendrix , as part of ros-controls/ros_control#234 (ROS Kinetic release), I'd like to know if this PR could be close? Initially I thought this could be important for ROS Kinetic, but I've just realized that:

  1. This targets ROS hydro
  2. It's quite old, from 2013
  3. The branch from this PR has conflicts (with hydro-devel)
  4. realtime_tools doesn't have any test, and make run_tests runs w/o errors locally even in that case

For me it looks like it can be close and also we don't need anything like this for kinetic-devel because there is no test for this package.

FYI @bmagyar

@efernandez
Copy link

Essentially, all (or most) .travis.yml file in the different ros-controls packages are the same (or very similar) and all them simply run catkin_make -j2. This means that ATM we only have compilation sanity for all the commits on the PRs, but the tests (if any) aren't checked at all.

It'd be great to have the tests actually checked on Travis CI. It seems to me that this PR was testing that with the intention to apply it to all the packages in the repo.

I can have a look myself, but I'd like to know the current state on this first and your thoughts? Especially for the ROS Kinetic release.

@efernandez
Copy link

I've just run catkin_make -j2 run_tests in a workspace with realtime_tools and ros_control. These are the only tests failing:

[controller_manager_tests.rosunit-cm_msgs_utils_rostest/test_controller_lister][ERROR]
global name 'ROSException' is not defined
  File "/usr/lib/python2.7/unittest/case.py", line 331, in run
    testMethod()
  File "/ws/ros_control_ws/src/ros_control/controller_manager_tests/test/cm_msgs_utils_rostest.py", line 108, in test_controller_lister
    self.assertTrue(self._ready())
  File "/ws/ros_control_ws/src/ros_control/controller_manager_tests/test/cm_msgs_utils_rostest.py", line 50, in _ready
    except ROSException:
--------------------------------------------------------------------------------

[controller_manager_tests.rosunit-cm_msgs_utils_rostest/test_controller_manager_lister][ERROR]
global name 'ROSException' is not defined
  File "/usr/lib/python2.7/unittest/case.py", line 331, in run
    testMethod()
  File "/ws/ros_control_ws/src/ros_control/controller_manager_tests/test/cm_msgs_utils_rostest.py", line 96, in test_controller_manager_lister
    self.assertTrue(self._ready())
  File "/ws/ros_control_ws/src/ros_control/controller_manager_tests/test/cm_msgs_utils_rostest.py", line 50, in _ready
    except ROSException:
--------------------------------------------------------------------------------

[controller_manager_tests.rosunit-cm_msgs_utils_rostest/test_get_controller_managers][ERROR]
global name 'ROSException' is not defined
  File "/usr/lib/python2.7/unittest/case.py", line 331, in run
    testMethod()
  File "/ws/ros_control_ws/src/ros_control/controller_manager_tests/test/cm_msgs_utils_rostest.py", line 63, in test_get_controller_managers
    self.assertTrue(self._ready())
  File "/ws/ros_control_ws/src/ros_control/controller_manager_tests/test/cm_msgs_utils_rostest.py", line 50, in _ready
    except ROSException:
--------------------------------------------------------------------------------

[controller_manager_tests.rosunit-cm_msgs_utils_rostest/test_is_controller_manager][ERROR]
global name 'ROSException' is not defined
  File "/usr/lib/python2.7/unittest/case.py", line 331, in run
    testMethod()
  File "/ws/ros_control_ws/src/ros_control/controller_manager_tests/test/cm_msgs_utils_rostest.py", line 55, in test_is_controller_manager
    self.assertTrue(self._ready())
  File "/ws/ros_control_ws/src/ros_control/controller_manager_tests/test/cm_msgs_utils_rostest.py", line 50, in _ready
    except ROSException:
--------------------------------------------------------------------------------


SUMMARY
 * RESULT: FAIL
 * TESTS: 4
 * ERRORS: 4
 * FAILURES: 0

Looks like something easy to fix. But I don't know if it's already fix in newer versions (I'm testing with indigo-devel). I also have to test with more packages on the workspace, as they might have broken tests too.

@trainman419
Copy link

wow... I forgot about this one.

I think I opened this specifically because some combination of conversation with other developers and discovery that this package wasn't running its tests. I don't remember the details.

I don't have any particular investment in this or any reason to keep this PR open; particularly against the old Hydro branch.

@trainman419
Copy link

Related: ros-controls/ros_controllers#76

@efernandez
Copy link

I forgot to source devel/setup.bash for that test. It actually works. It simply has that minor bug of not using rospy.ROSException if the environment is NOT setup, which leads to the mock up to fail. Not really important at the end. I'll create a PR anyway.

@ahendrix Yes, ros-control is simply checking that things build fine, but no test is checked at all, which should be solved. If you don't mind, let me look into it in this thread.

@bmagyar
Copy link
Member

bmagyar commented Apr 18, 2016

A big 👍 for this guys
On 18 Apr 2016 02:53, "Enrique Fernández Perdomo" [email protected]
wrote:

I forgot to source devel/setup.bash for that test. It actually works. It
simply has that minor bug of not using rospy.ROSException if the
environment is NOT setup, which leads to the mock up to fail. Not really
important at the end. I'll create a PR anyway.

@ahendrix https://github.com/ahendrix Yes, ros-control is simply
checking that things build fine, but no test is checked at all, which
should be solved. If you don't mind, let me look into it in this thread.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#8 (comment)

bmagyar referenced this pull request in ros-controls/ros_control May 2, 2016
The doSwitch method needs to be executed in the update() method,  that is, in
the real-time path, which is where controller switching actually takes place.

It was previously done in the switchController callback, which is non real-time.
In this method controller switching is scheduled, but not actually executed.

This changeset fixes a bug in which hardware interface  modes could switch
before controllers, leading to undefined behavior.
@efernandez
Copy link

I'll update the realtime_tools .travis once the one I've done for ros_controllers passes all tests: ros-controls/ros_controllers#211

@bmagyar
Copy link
Member

bmagyar commented Oct 30, 2017

Done in #20

@bmagyar bmagyar closed this Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants