From 7df43dc2ce887a253383a311da72e3430e91d01e Mon Sep 17 00:00:00 2001 From: Dave Wallace Date: Wed, 24 Mar 2021 18:03:01 -0400 Subject: tests: move vppinfra tests to src/vppinfra/test - Refactor make test code to be co-located with the vpp feature source code Type: test Signed-off-by: Dave Wallace Change-Id: Iceaeab769c08e541b31546663d0e402ced862e5b --- src/vppinfra/test/test_vppinfra.py | 40 ++++++++++++++++++++++++++++++++++++++ test/test_vppinfra.py | 40 -------------------------------------- 2 files changed, 40 insertions(+), 40 deletions(-) create mode 100644 src/vppinfra/test/test_vppinfra.py delete mode 100644 test/test_vppinfra.py diff --git a/src/vppinfra/test/test_vppinfra.py b/src/vppinfra/test/test_vppinfra.py new file mode 100644 index 00000000000..8b6ec965fea --- /dev/null +++ b/src/vppinfra/test/test_vppinfra.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python3 + +import unittest + +from framework import VppTestCase, VppTestRunner, running_extended_tests +from framework import running_gcov_tests + + +class TestVppinfra(VppTestCase): + """ Vppinfra Unit Test Cases """ + vpp_worker_count = 1 + + @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): + """ Bitmap Code Coverage Test """ + cmds = ["test bitmap"] + + for cmd in cmds: + r = self.vapi.cli_return_response(cmd) + if r.retval != 0: + if hasattr(r, 'reply'): + self.logger.info(cmd + " FAIL reply " + r.reply) + else: + self.logger.info(cmd + " FAIL retval " + str(r.retval)) + +if __name__ == '__main__': + unittest.main(testRunner=VppTestRunner) diff --git a/test/test_vppinfra.py b/test/test_vppinfra.py deleted file mode 100644 index 8b6ec965fea..00000000000 --- a/test/test_vppinfra.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python3 - -import unittest - -from framework import VppTestCase, VppTestRunner, running_extended_tests -from framework import running_gcov_tests - - -class TestVppinfra(VppTestCase): - """ Vppinfra Unit Test Cases """ - vpp_worker_count = 1 - - @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): - """ Bitmap Code Coverage Test """ - cmds = ["test bitmap"] - - for cmd in cmds: - r = self.vapi.cli_return_response(cmd) - if r.retval != 0: - if hasattr(r, 'reply'): - self.logger.info(cmd + " FAIL reply " + r.reply) - else: - self.logger.info(cmd + " FAIL retval " + str(r.retval)) - -if __name__ == '__main__': - unittest.main(testRunner=VppTestRunner) -- cgit 1.2.3-korg