Dave Barach | 37b4454 | 2020-04-27 18:38:36 -0400 | [diff] [blame] | 1 | #!/usr/bin/env python3 |
| 2 | |
| 3 | import unittest |
| 4 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 5 | from framework import VppTestCase, VppTestRunner |
Dave Barach | 37b4454 | 2020-04-27 18:38:36 -0400 | [diff] [blame] | 6 | |
| 7 | |
| 8 | class TestVppinfra(VppTestCase): |
| 9 | """ Vppinfra Unit Test Cases """ |
Klement Sekera | 8d81502 | 2021-03-15 16:58:10 +0100 | [diff] [blame] | 10 | vpp_worker_count = 1 |
Dave Barach | 37b4454 | 2020-04-27 18:38:36 -0400 | [diff] [blame] | 11 | |
| 12 | @classmethod |
| 13 | def setUpClass(cls): |
| 14 | super(TestVppinfra, cls).setUpClass() |
| 15 | |
| 16 | @classmethod |
| 17 | def tearDownClass(cls): |
| 18 | super(TestVppinfra, cls).tearDownClass() |
| 19 | |
| 20 | def setUp(self): |
| 21 | super(TestVppinfra, self).setUp() |
| 22 | |
| 23 | def tearDown(self): |
| 24 | super(TestVppinfra, self).tearDown() |
| 25 | |
| 26 | def test_bitmap_unittest(self): |
| 27 | """ Bitmap Code Coverage Test """ |
| 28 | cmds = ["test bitmap"] |
| 29 | |
| 30 | for cmd in cmds: |
| 31 | r = self.vapi.cli_return_response(cmd) |
| 32 | if r.retval != 0: |
| 33 | if hasattr(r, 'reply'): |
| 34 | self.logger.info(cmd + " FAIL reply " + r.reply) |
| 35 | else: |
| 36 | self.logger.info(cmd + " FAIL retval " + str(r.retval)) |
| 37 | |
| 38 | if __name__ == '__main__': |
| 39 | unittest.main(testRunner=VppTestRunner) |