oem7_publish_test.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import unittest
4 import rospy
5 import sys
6 import os
7 
8 import oem7_decoder_test
9 #from __builtin__ import None
10 
11 PKG = 'novatel_oem7_driver'
12 NAME = 'publishtest'
13 
14 class Oem7PublishTest(unittest.TestCase):
15  def __init__(self, *args):
16 
17  super(self.__class__, self).__init__(*args)
18  rospy.init_node(NAME)
19 
20  def test_1_record_uut(self):
21  """
22  Purge existing bag, record new one.
23 
24  Fails if stale file cannot be purged.
25  """
26 
27  if os.path.exists(self.uut_bag):
28  os.remove(self.uut_bag)
29 
30  delay_sec = float(rospy.get_param('~delay_sec', 10.))
31  rospy.sleep(delay_sec)
32 
34  oem7_decoder_test.verify_bag_equivalency(self.ref_bag, self.uut_bag)
35 
36 
37 if __name__ == '__main__':
38  import rostest
39 
40  Oem7PublishTest.ref_bag = sys.argv[1] + ".bag"
41  Oem7PublishTest.uut_bag = sys.argv[2] + "-test.bag"
42 
43  rostest.run(PKG, NAME, Oem7PublishTest, sysargs = sys.argv)
44 
def verify_bag_equivalency(ref_bag, uut_bag)


novatel_oem7_driver
Author(s):
autogenerated on Tue Mar 9 2021 03:48:00