aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2024-11-25 14:15:43 +0100
committerVratko Polak <vrpolak@cisco.com>2024-11-25 13:52:46 +0000
commita59d8987a84bdd2d6a5e449c0f24d29b29cd96dd (patch)
tree540ee4195475c374c4b0b8d7cd12f486fd11b3ba /resources
parent691498c668d4fc0194a0fc40ca61f18626690555 (diff)
feat(dma): Add show dma as test teardown
Add the teardown to memif and nginx tests, for memif it needs to be before "container" teardown. Change-Id: I142b76d3e47554d3a8050e04b9598592b43f22c1 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/DMAUtil.py13
-rw-r--r--resources/libraries/robot/shared/test_teardown.robot10
2 files changed, 21 insertions, 2 deletions
diff --git a/resources/libraries/python/DMAUtil.py b/resources/libraries/python/DMAUtil.py
index f904ea4e3d..0c0ed3cba3 100644
--- a/resources/libraries/python/DMAUtil.py
+++ b/resources/libraries/python/DMAUtil.py
@@ -14,8 +14,10 @@
"""DMA util library."""
from re import search
-from resources.libraries.python.topology import NodeType, Topology
+
+from resources.libraries.python.PapiExecutor import PapiSocketExecutor
from resources.libraries.python.ssh import exec_cmd, exec_cmd_no_error
+from resources.libraries.python.topology import NodeType, Topology
class DMAUtil:
@@ -211,3 +213,12 @@ class DMAUtil:
node, cmd, sudo=True, message="Failed")
return enabled_wqs
+
+ @staticmethod
+ def vpp_show_dma(node):
+ """Call show dma CLI command on all sockets.
+
+ :param node: Topology node.
+ :type node: dict
+ """
+ PapiSocketExecutor.run_cli_cmd_on_all_sockets(node, u"show dma")
diff --git a/resources/libraries/robot/shared/test_teardown.robot b/resources/libraries/robot/shared/test_teardown.robot
index f590e8a7cd..81a9454bce 100644
--- a/resources/libraries/robot/shared/test_teardown.robot
+++ b/resources/libraries/robot/shared/test_teardown.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2023 Cisco and/or its affiliates.
+# Copyright (c) 2024 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -105,6 +105,14 @@
| | | ... | Show DET44 verbose | ${nodes['${dut}']}
| | END
+| Additional Test Tear Down Action For dma
+| | [Documentation]
+| | ... | Log information relevant to DMA tests.
+| |
+| | FOR | ${dut} | IN | @{duts}
+| | | VPP Show DMA | ${nodes['${dut}']}
+| | END
+
| Additional Test Tear Down Action For geneve4
| | [Documentation]
| | ... | Additional teardown for tests which uses GENEVE IPv4 tunnel.