From 221413899ecb98a022a492b11abd0c432ce7ab1d Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Fri, 14 Jul 2017 14:11:39 -0700 Subject: [PATCH] fix roswtf test when rosdep is not initialized --- utilities/roswtf/test/check_roswtf_command_line_online.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/utilities/roswtf/test/check_roswtf_command_line_online.py b/utilities/roswtf/test/check_roswtf_command_line_online.py index 46676c0eb4..2635c22169 100755 --- a/utilities/roswtf/test/check_roswtf_command_line_online.py +++ b/utilities/roswtf/test/check_roswtf_command_line_online.py @@ -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)