4 Test: grep input bags to SQL schema 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 writing schema to SQL file."""
29 NAME = os.path.splitext(os.path.basename(__file__))[0]
35 OUTPUT_SUFFIX =
".sql"
38 """Collects bags in data directory, assembles command."""
40 self.
_cmd = self.
CMD_BASE + [
"--no-console-output",
"--plugin",
"grepros.plugins.sql",
44 """Runs grepros on bags in data directory, verifies HTML output."""
47 self.assertTrue(os.path.isfile(self.
_outname),
"Expected output file not written.")
49 logger.info(
"Reading data from written %s.", self.
OUTPUT_LABEL)
55 if "__main__" == __name__:
56 TestBagInputSqlOutput.run_rostest()