aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/DUTSetup.py20
-rw-r--r--resources/libraries/robot/default.robot7
-rw-r--r--resources/templates/vat/api_trace_dump.vat1
-rw-r--r--resources/templates/vat/api_trace_save.vat1
4 files changed, 29 insertions, 0 deletions
diff --git a/resources/libraries/python/DUTSetup.py b/resources/libraries/python/DUTSetup.py
index 4731063fba..e2d183fe4e 100644
--- a/resources/libraries/python/DUTSetup.py
+++ b/resources/libraries/python/DUTSetup.py
@@ -46,6 +46,26 @@ class DUTSetup(object):
vat.execute_script("show_version_verbose.vat", node, json_out=False)
@staticmethod
+ def vpp_api_trace_save(node):
+ """Run "api trace save" CLI command.
+
+ :param node: Node to run command on.
+ :type node: dict
+ """
+ vat = VatExecutor()
+ vat.execute_script("api_trace_save.vat", node, json_out=False)
+
+ @staticmethod
+ def vpp_api_trace_dump(node):
+ """Run "api trace custom-dump" CLI command.
+
+ :param node: Node to run command on.
+ :type node: dict
+ """
+ vat = VatExecutor()
+ vat.execute_script("api_trace_dump.vat", node, json_out=False)
+
+ @staticmethod
def setup_all_duts(nodes):
"""Prepare all DUTs in given topology for test execution."""
for node in nodes.values():
diff --git a/resources/libraries/robot/default.robot b/resources/libraries/robot/default.robot
index 2b116f5a7a..81f991bb83 100644
--- a/resources/libraries/robot/default.robot
+++ b/resources/libraries/robot/default.robot
@@ -34,6 +34,13 @@
| | :FOR | ${dut} | IN | @{duts}
| | | Vpp show version verbose | ${nodes['${dut}']}
+| Show vpp trace dump on all DUTs
+| | [Documentation] | Save API trace and dump output on all DUTs
+| | ${duts}= | Get Matches | ${nodes} | DUT*
+| | :FOR | ${dut} | IN | @{duts}
+| | | Vpp api trace save | ${nodes['${dut}']}
+| | | Vpp api trace dump | ${nodes['${dut}']}
+
| Add '${m}' worker threads and rxqueues '${n}' without HTT to all DUTs
| | [Documentation] | Setup M worker threads without HTT and rxqueues N in
| | ... | startup configuration of VPP to all DUTs
diff --git a/resources/templates/vat/api_trace_dump.vat b/resources/templates/vat/api_trace_dump.vat
new file mode 100644
index 0000000000..a0f94a34ed
--- /dev/null
+++ b/resources/templates/vat/api_trace_dump.vat
@@ -0,0 +1 @@
+exec api trace custom-dump /tmp/csit.api
diff --git a/resources/templates/vat/api_trace_save.vat b/resources/templates/vat/api_trace_save.vat
new file mode 100644
index 0000000000..f3d2fa3780
--- /dev/null
+++ b/resources/templates/vat/api_trace_save.vat
@@ -0,0 +1 @@
+exec api trace save csit.api