- command = ('for f in {dir}/*.core; do '
- 'sudo gdb /usr/bin/vpp ${{f}} '
- '--eval-command="set pagination off" '
- '--eval-command="thread apply all bt" '
- '--eval-command="quit"; '
- 'sudo rm -f ${{f}}; done'
- .format(dir=Constants.CORE_DUMP_DIR))
- try:
- exec_cmd_no_error(node, command, timeout=3600)
- if disable_on_success:
- self.set_core_limit_disabled()
- except RuntimeError:
- # If compress was not sucessfull ignore error and skip further
- # processing.
- continue
+ if node[u"type"] == NodeType.DUT:
+ command = (
+ f"for f in {Constants.CORE_DUMP_DIR}/*.core; do "
+ f"sudo gdb /usr/bin/vpp ${{f}} "
+ f"-ex 'source -v {Constants.REMOTE_FW_DIR}"
+ f"/resources/tools/scripts/gdb-commands' -ex quit; "
+ f"sudo rm -f ${{f}}; done"
+ )
+ try:
+ exec_cmd_no_error(node, command, timeout=3600)
+ if disable_on_success:
+ self.set_core_limit_disabled()
+ except RuntimeError:
+ # If compress was not successful ignore error and skip
+ # further processing.
+ continue