aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/VPPUtil.py
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2018-09-28 13:55:42 +0000
committerPeter Mikus <pmikus@cisco.com>2018-10-01 11:52:35 +0000
commit424749b09ac91c4eb5eabdd8bdd9d34b8c130783 (patch)
tree5c6cff1609f528541f2ba2e79217c56f615b7746 /resources/libraries/python/VPPUtil.py
parent3bd92c7d17d20cf949c20e5d0324323e5c612631 (diff)
CSIT-1326 Add barrier event traces
Change-Id: I0f734c2f11cc89716371554880f1d7404ea16090 Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/libraries/python/VPPUtil.py')
-rw-r--r--resources/libraries/python/VPPUtil.py43
1 files changed, 43 insertions, 0 deletions
diff --git a/resources/libraries/python/VPPUtil.py b/resources/libraries/python/VPPUtil.py
index 17310aa21a..f6b3afae28 100644
--- a/resources/libraries/python/VPPUtil.py
+++ b/resources/libraries/python/VPPUtil.py
@@ -211,3 +211,46 @@ class VPPUtil(object):
for node in nodes.values():
if node['type'] == NodeType.DUT:
VPPUtil.vpp_enable_traces_on_dut(node)
+
+ @staticmethod
+ def vpp_enable_barrier_traces_on_dut(node):
+ """Enable vpp barrier traces on the DUT node.
+
+ :param node: DUT node to set up.
+ :type node: dict
+ """
+ vat = VatExecutor()
+ vat.execute_script("test_threads_barrier_elog.vat", node,
+ json_out=False)
+
+ @staticmethod
+ def vpp_enable_barrier_traces_on_all_duts(nodes):
+ """Enable vpp barrier traces on all DUTs in the given topology.
+
+ :param nodes: Nodes in the topology.
+ :type nodes: dict
+ """
+ for node in nodes.values():
+ if node['type'] == NodeType.DUT:
+ VPPUtil.vpp_enable_barrier_traces_on_dut(node)
+
+ @staticmethod
+ def show_event_logger_on_dut(node):
+ """Show event logger on the DUT node.
+
+ :param node: DUT node to show traces on.
+ :type node: dict
+ """
+ vat = VatExecutor()
+ vat.execute_script("show_event_logger.vat", node, json_out=False)
+
+ @staticmethod
+ def show_event_logger_on_all_duts(nodes):
+ """Show event logger on all DUTs in the given topology.
+
+ :param nodes: Nodes in the topology.
+ :type nodes: dict
+ """
+ for node in nodes.values():
+ if node['type'] == NodeType.DUT:
+ VPPUtil.show_event_logger_on_dut(node) \ No newline at end of file