Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
vlib: add format_vnet_buffer_no_chain
[vpp.git]
/
test
/
test_mactime.py
diff --git
a/test/test_mactime.py
b/test/test_mactime.py
index
ab3d537
..
85ded33
100644
(file)
--- a/
test/test_mactime.py
+++ b/
test/test_mactime.py
@@
-1,8
+1,8
@@
-#!/usr/bin/env python
+#!/usr/bin/env python
3
import unittest
import unittest
-from framework import VppTestCase, VppTestRunner, running_
extended
_tests
+from framework import VppTestCase, VppTestRunner, running_
gcov
_tests
from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
@@
-31,7
+31,7
@@
class TestMactime(VppTestCase):
self.logger.critical(error)
self.assertNotIn('FAILED', error)
self.logger.critical(error)
self.assertNotIn('FAILED', error)
- @unittest.skipUnless(running_
extended_tests, "part of extended
tests")
+ @unittest.skipUnless(running_
gcov_tests, "part of code coverage
tests")
def test_mactime_unittest(self):
""" Mactime Plugin Code Coverage Test """
cmds = ["loopback create",
def test_mactime_unittest(self):
""" Mactime Plugin Code Coverage Test """
cmds = ["loopback create",
@@
-44,7
+44,7
@@
class TestMactime(VppTestCase):
"bin mactime_enable_disable sw_if_index 1",
"set interface state loop0 up",
"clear mactime",
"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 "
"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
+149,12
@@
class TestMactime(VppTestCase):
"show error"]
for cmd in cmds:
"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)
if __name__ == '__main__':
unittest.main(testRunner=VppTestRunner)