aboutsummaryrefslogtreecommitdiffstats
path: root/test/framework.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2018-11-08 11:24:34 +0100
committerDamjan Marion <dmarion@me.com>2018-11-08 11:55:06 +0000
commitf37c3ba9379c77805b40506dd72b3bc9eb1e8d08 (patch)
tree9b68e21876c1c6be4db1d08a344795e592e480a3 /test/framework.py
parentefefc6b4b219e2897e48def83352b4df52bc03a0 (diff)
make test: p2p ethernet refactor
Change-Id: I48b4b3eaa84e4174e4d0305594675bf983184fa0 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/framework.py')
-rw-r--r--test/framework.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/framework.py b/test/framework.py
index 5bbd56a6ef7..27fcdb5a7f6 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -300,7 +300,8 @@ class VppTestCase(unittest.TestCase):
"}", "}", ]
if plugin_path is not None:
cls.vpp_cmdline.extend(["plugin_path", plugin_path])
- cls.logger.info("vpp_cmdline: %s" % cls.vpp_cmdline)
+ cls.logger.info("vpp_cmdline args: %s" % cls.vpp_cmdline)
+ cls.logger.info("vpp_cmdline: %s" % " ".join(cls.vpp_cmdline))
@classmethod
def wait_for_enter(cls):
@@ -896,6 +897,17 @@ class VppTestCase(unittest.TestCase):
if pkt.haslayer(ICMPv6EchoReply):
self.assert_checksum_valid(pkt, 'ICMPv6EchoReply', 'cksum')
+ def assert_packet_counter_equal(self, counter, expected_value):
+ counters = self.vapi.cli("sh errors").split('\n')
+ counter_value = -1
+ for i in range(1, len(counters)-1):
+ results = counters[i].split()
+ if results[1] == counter:
+ counter_value = int(results[0])
+ break
+ self.assert_equal(counter_value, expected_value,
+ "packet counter `%s'" % counter)
+
@classmethod
def sleep(cls, timeout, remark=None):
if hasattr(cls, 'logger'):