| from framework import VppTestCase, VppTestRunner, running_extended_tests |
| from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath |
| class TestMpcap(VppTestCase): |
| """ Mpcap Unit Test Cases """ |
| super(TestMpcap, cls).setUpClass() |
| super(TestMpcap, cls).tearDownClass() |
| super(TestMpcap, self).setUp() |
| super(TestMpcap, self).tearDown() |
| def test_mpcap_unittest(self): |
| """ Mapped pcap file test """ |
| cmds = ["packet-generator new {\n" |
| " IP6: 00:d0:2d:5e:86:85 -> 00:0d:ea:d0:00:00\n" |
| " ICMP: db00::1 -> db00::2\n" |
| self.logger.info(self.vapi.cli(cmd)) |
| size = os.path.getsize("/tmp/mpcap_unittest.pcap") |
| os.remove("/tmp/mpcap_unittest.pcap") |
| self.logger.critical("BUG: file size %d not 2184" % size) |
| self.assertNotIn('WrongMPCAPFileSize', 'WrongMPCAPFileSize') |
| if __name__ == '__main__': |
| unittest.main(testRunner=VppTestRunner) |