diff options
-rw-r--r-- | resources/libraries/python/InterfaceUtil.py | 3 | ||||
-rw-r--r-- | resources/libraries/python/VPPUtil.py | 35 | ||||
-rw-r--r-- | resources/libraries/robot/shared/test_teardown.robot | 1 |
3 files changed, 26 insertions, 13 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py index d185137940..a15507454a 100644 --- a/resources/libraries/python/InterfaceUtil.py +++ b/resources/libraries/python/InterfaceUtil.py @@ -1199,6 +1199,9 @@ class InterfaceUtil(object): :raises RuntimeError: If it is not possible to create AVF interface on the node. """ + PapiSocketExecutor.run_cli_cmd( + node, 'set logging class avf level debug') + cmd = 'avf_create' args = dict(pci_addr=InterfaceUtil.pci_to_int(vf_pci_addr), enable_elog=0, diff --git a/resources/libraries/python/VPPUtil.py b/resources/libraries/python/VPPUtil.py index 432a589cd3..72b6142306 100644 --- a/resources/libraries/python/VPPUtil.py +++ b/resources/libraries/python/VPPUtil.py @@ -259,10 +259,10 @@ class VPPUtil(object): VPPUtil.vpp_enable_traces_on_dut(node, fail_on_error) @staticmethod - def vpp_enable_elog_traces_on_dut(node): - """Enable API/CLI/Barrier traces on the DUT node. + def vpp_enable_elog_traces(node): + """Enable API/CLI/Barrier traces on the specified topology node. - :param node: DUT node to set up. + :param node: Topology node. :type node: dict """ PapiSocketExecutor.run_cli_cmd(node, "elog trace api cli barrier") @@ -276,13 +276,13 @@ class VPPUtil(object): """ for node in nodes.values(): if node['type'] == NodeType.DUT: - VPPUtil.vpp_enable_elog_traces_on_dut(node) + VPPUtil.vpp_enable_elog_traces(node) @staticmethod - def show_event_logger_on_dut(node): - """Show event logger on the DUT node. + def show_event_logger(node): + """Show event logger on the specified topology node. - :param node: DUT node to show traces on. + :param node: Topology node. :type node: dict """ PapiSocketExecutor.run_cli_cmd(node, "show event-logger") @@ -296,18 +296,27 @@ class VPPUtil(object): """ for node in nodes.values(): if node['type'] == NodeType.DUT: - VPPUtil.show_event_logger_on_dut(node) + VPPUtil.show_event_logger(node) @staticmethod def show_log(node): - """Show log on the specified topology node. + """Show logging on the specified topology node. :param node: Topology node. :type node: dict - :returns: VPP log data. - :rtype: list """ - return PapiSocketExecutor.run_cli_cmd(node, "show log") + PapiSocketExecutor.run_cli_cmd(node, "show logging") + + @staticmethod + def show_log_on_all_duts(nodes): + """Show logging 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_log(node) @staticmethod def vpp_show_threads(node): @@ -331,6 +340,6 @@ class VPPUtil(object): thread_data.append(item) threads_data.append(thread_data) - logger.info("show threads:\n{threads}".format(threads=threads_data)) + logger.trace("show threads:\n{threads}".format(threads=threads_data)) return threads_data diff --git a/resources/libraries/robot/shared/test_teardown.robot b/resources/libraries/robot/shared/test_teardown.robot index 1cc526211d..0beeff4484 100644 --- a/resources/libraries/robot/shared/test_teardown.robot +++ b/resources/libraries/robot/shared/test_teardown.robot @@ -33,6 +33,7 @@ | | ... | | Remove All Added Ports On All DUTs From Topology | ${nodes} | | Show PAPI History On All DUTs | ${nodes} +| | Show Log On All DUTs | ${nodes} | | Run Keyword If Test Failed | | ... | Get Core Files on All Nodes | ${nodes} | | Run Keyword If Test Failed |