diff options
-rw-r--r-- | resources/libraries/python/TrafficGenerator.py | 7 | ||||
-rw-r--r-- | resources/libraries/robot/shared/suite_teardown.robot | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py index f48792db3d..c99ea36f71 100644 --- a/resources/libraries/python/TrafficGenerator.py +++ b/resources/libraries/python/TrafficGenerator.py @@ -427,8 +427,11 @@ class TrafficGenerator(AbstractMeasurer): subtype = check_subtype(node) if subtype == NodeSubTypeTG.TREX: exec_cmd_no_error( - node, u"sh -c \"sudo pkill t-rex && sleep 3\"", - sudo=False, message=u"pkill t-rex failed" + node, + u"sh -c " + u"\"if pgrep t-rex; then sudo pkill t-rex && sleep 3; fi\"", + sudo=False, + message=u"pkill t-rex failed" ) def _parse_traffic_results(self, stdout): diff --git a/resources/libraries/robot/shared/suite_teardown.robot b/resources/libraries/robot/shared/suite_teardown.robot index f0006792ab..362c7366e9 100644 --- a/resources/libraries/robot/shared/suite_teardown.robot +++ b/resources/libraries/robot/shared/suite_teardown.robot @@ -39,7 +39,7 @@ | | [Documentation] | | ... | Additional teardown for suites which uses performance measurement. | | -| | Teardown traffic generator | ${tg} +| | Run Keyword And Ignore Error | Teardown traffic generator | ${tg} | Additional Suite Tear Down Action For dpdk | | [Documentation] |