X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest_mactime.py;h=1eaeeb53a9d88365da71e32d6f75a7ed71dc7f47;hb=b23ffd7ef216463c35b75c831e6a27e58971f4ec;hp=ab3d5371815ba6e0bd625ed3647b9017a837f1e6;hpb=7d31ab2a5cc2124ddd973ac5dfac2219619f345a;p=vpp.git diff --git a/test/test_mactime.py b/test/test_mactime.py index ab3d5371815..1eaeeb53a9d 100644 --- a/test/test_mactime.py +++ b/test/test_mactime.py @@ -1,8 +1,9 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import unittest -from framework import VppTestCase, VppTestRunner, running_extended_tests +from config import config +from framework import VppTestCase, VppTestRunner from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath @@ -31,7 +32,7 @@ class TestMactime(VppTestCase): self.logger.critical(error) self.assertNotIn('FAILED', error) - @unittest.skipUnless(running_extended_tests, "part of extended tests") + @unittest.skipUnless(config.gcov, "part of code coverage tests") def test_mactime_unittest(self): """ Mactime Plugin Code Coverage Test """ cmds = ["loopback create", @@ -44,7 +45,7 @@ class TestMactime(VppTestCase): "bin mactime_enable_disable sw_if_index 1", "set interface state loop0 up", "clear mactime", - "set ip arp loop0 192.168.1.1 00:d0:2d:5e:86:85", + "set ip neighbor loop0 192.168.1.1 00:d0:2d:5e:86:85", "bin mactime_add_del_range name sallow " "mac 00:d0:2d:5e:86:85 allow-static del", "bin mactime_add_del_range name sallow " @@ -149,7 +150,12 @@ class TestMactime(VppTestCase): "show error"] for cmd in cmds: - self.logger.info(self.vapi.cli(cmd)) + 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)