4 Test: grep input bags to console output.
6 ------------------------------------------------------------------------------
7 This file is part of grepros - grep for ROS bag files and live topics.
8 Released under the BSD License.
13 ------------------------------------------------------------------------------
19 sys.path.insert(0, os.path.join(os.path.dirname(__file__),
".."))
20 from test
import testbase
22 logger = logging.getLogger()
26 """Tests grepping from input bags and printing matches to console."""
29 NAME = os.path.splitext(os.path.basename(__file__))[0]
32 OUTPUT_LABEL =
"console"
35 """Collects bags in data directory, assembles command."""
40 """Runs grepros on bags in data directory, verifies console output."""
43 self.assertTrue(fulltext,
"Command did not print to console.")
45 for bag
in self.
_bags:
46 self.assertIn(os.path.basename(bag), fulltext,
"Expected bag not in output.")
50 if "__main__" == __name__:
51 TestBagInputConsoleOutput.run_rostest()