2020-04-27 18:38:36 -04:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
import unittest
|
|
|
|
|
2021-05-31 16:08:53 +02:00
|
|
|
from framework import VppTestCase, VppTestRunner
|
2020-04-27 18:38:36 -04:00
|
|
|
|
|
|
|
|
|
|
|
class TestVppinfra(VppTestCase):
|
2022-04-26 19:02:15 +02:00
|
|
|
"""Vppinfra Unit Test Cases"""
|
|
|
|
|
2021-03-15 16:58:10 +01:00
|
|
|
vpp_worker_count = 1
|
2020-04-27 18:38:36 -04:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def setUpClass(cls):
|
|
|
|
super(TestVppinfra, cls).setUpClass()
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def tearDownClass(cls):
|
|
|
|
super(TestVppinfra, cls).tearDownClass()
|
|
|
|
|
|
|
|
def setUp(self):
|
|
|
|
super(TestVppinfra, self).setUp()
|
|
|
|
|
|
|
|
def tearDown(self):
|
|
|
|
super(TestVppinfra, self).tearDown()
|
|
|
|
|
|
|
|
def test_bitmap_unittest(self):
|
2022-04-26 19:02:15 +02:00
|
|
|
"""Bitmap Code Coverage Test"""
|
2020-04-27 18:38:36 -04:00
|
|
|
cmds = ["test bitmap"]
|
|
|
|
|
|
|
|
for cmd in cmds:
|
|
|
|
r = self.vapi.cli_return_response(cmd)
|
|
|
|
if r.retval != 0:
|
2022-04-26 19:02:15 +02:00
|
|
|
if hasattr(r, "reply"):
|
2020-04-27 18:38:36 -04:00
|
|
|
self.logger.info(cmd + " FAIL reply " + r.reply)
|
|
|
|
else:
|
|
|
|
self.logger.info(cmd + " FAIL retval " + str(r.retval))
|
|
|
|
|
2022-04-26 19:02:15 +02:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2020-04-27 18:38:36 -04:00
|
|
|
unittest.main(testRunner=VppTestRunner)
|