rostest: Test node does not exist or is not executable
I'm currently writing unit / integration tests for my nodes and i'm stuck adding them the the build scripts. When running
rostest my_pkg tests.test
I get the following error
[Testcase: testtest_vehicle_controller] ... FAILURE!
FAILURE: Test node [my_pkg/test_vehicle_controller.py] does not exist or is not executable
File "/usr/lib/python2.7/unittest/case.py", line 329, in run
testMethod()
File "/opt/ros/lunar/lib/python2.7/dist-packages/rostest/runner.py", line 93, in fn
self.fail(message)
File "/usr/lib/python2.7/unittest/case.py", line 410, in fail
raise self.failureException(msg)
--------------------------------------------------------------------------------
[ROSTEST]-----------------------------------------------------------------------
[testtest_vehicle_controller][failed]
SUMMARY
* RESULT: FAIL
* TESTS: 0
* ERRORS: 0
* FAILURES: 1
ERROR: The following tests failed to run:
* testtest_vehicle_controller
my tests.test
file looks like this
<launch>
<test test-name="test_vehicle_controller" pkg="my_pkg" type="test_vehicle_controller.py" />
</launch>
my package structure looks like this
├── CMakeLists.txt
├── include
├── package.xml
├── src
│ ├── __init__.py
│ ├── __init__.pyc
│ ├── main
│ │ ├── __init__.py
│ │ └── vehicle_controller.py
│ └── tests
│ ├── context.py
│ ├── __init__.py
│ ├── Testing
│ │ └── Temporary
│ │ ├── CTestCostData.txt
│ │ └── LastTest.log
│ ├── tests.test
│ └── test_vehicle_controller.py
├── srv
│ └── ManipulatorPosition.srv
└── Testing
└── Temporary
├── CTestCostData.txt
└── LastTest.log
I don't see what I'm doing wrong here
edit:
my test_vehicle_controller.py
looks like this
#!/usr/bin/env python
import unittest
PKG = 'my_pkg'
import roslib; roslib.load_manifest(PKG)
class AdvancedTestSuite(unittest.TestCase):
"""Advanced test cases."""
def test_thoughts(self):
self.assertIsNone(None)
if __name__ == '__main__':
import rostest
rostest.rosrun(PKG, 'test_vehicle_controller', AdvancedTestSuite)
Is
test_vehicle_controller.py
executable? Does it have thex
bit set inls -al test_vehicle_controller.py
?yes it does (
-rwxr-xr-x
). I have the feeling that the path is not correct, but I have no idea what I need to changeafter a reboot every thing works as expected