From a59d8987a84bdd2d6a5e449c0f24d29b29cd96dd Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Mon, 25 Nov 2024 14:15:43 +0100 Subject: 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 --- resources/libraries/python/DMAUtil.py | 13 ++++++++++++- resources/libraries/robot/shared/test_teardown.robot | 10 +++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) (limited to 'resources') 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. -- cgit 1.2.3-korg