Skip to content

Commit

Permalink
fix roswtf test when rosdep is not initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Nov 6, 2017
1 parent 73778dd commit 2214138
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions utilities/roswtf/test/check_roswtf_command_line_online.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,15 @@ def _check_output(self, cmd, output, error=None):
'No errors or warnings' in output or 'Found 1 error' in output,
'CMD[%s] OUTPUT[%s]%s' %
(' '.join(cmd), output, '\nstderr[%s]' % error if error else ''))
if 'No errors or warnings' in output:
self.assert_('ERROR' not in output, 'OUTPUT[%s]' % output)
allowed_errors = 0
if 'Found 1 error' in output:
self.assert_(output.count('ERROR') == 1, 'OUTPUT[%s]' % output)
self.assert_(
'Error: the rosdep view is empty' not in output,
'ROS Dep database not updated' in output,
'OUTPUT[%s]' % output)
allowed_errors += 1
if 'No errors or warnings' in output:
self.assert_(output.count('ERROR') <= allowed_errors, 'OUTPUT[%s]' % output)

if __name__ == '__main__':
rostest.run(PKG, NAME, TestRostopicOnline, sys.argv)

0 comments on commit 2214138

Please sign in to comment.