diff options
Diffstat (limited to 'resources/libraries')
-rw-r--r-- | resources/libraries/python/DUTSetup.py | 13 | ||||
-rw-r--r-- | resources/libraries/robot/default.robot | 9 |
2 files changed, 17 insertions, 5 deletions
diff --git a/resources/libraries/python/DUTSetup.py b/resources/libraries/python/DUTSetup.py index dabdfceef2..4834ba6828 100644 --- a/resources/libraries/python/DUTSetup.py +++ b/resources/libraries/python/DUTSetup.py @@ -127,11 +127,16 @@ class DUTSetup(object): if len(stdout.splitlines()) == 1: return int(stdout) elif len(stdout.splitlines()) == 0: - raise RuntimeError("No VPP PID found on node {0}". - format(node['host'])) + logger.debug("No VPP PID found on node {0}". + format(node['host'])) + return None else: - raise RuntimeError("More then one VPP PID found on node {0}". - format(node['host'])) + logger.debug("More then one VPP PID found on node {0}". + format(node['host'])) + ret_list = () + for line in stdout.splitlines(): + ret_list.append(int(line)) + return ret_list @staticmethod def get_vpp_pids(nodes): diff --git a/resources/libraries/robot/default.robot b/resources/libraries/robot/default.robot index 05314d6a15..fd1b280b94 100644 --- a/resources/libraries/robot/default.robot +++ b/resources/libraries/robot/default.robot @@ -350,6 +350,12 @@ | | ... | where the key is the host and the value is the PID. | | ... | | ${setup_vpp_pids}= | Get VPP PIDs | ${nodes} +| | ${keys}= | Get Dictionary Keys | ${setup_vpp_pids} +| | :FOR | ${key} | IN | @{keys} +| | | ${pid}= | Get From Dictionary | ${setup_vpp_pids} | ${key} +| | | Run Keyword If | $pid is None | FAIL | No VPP PID found on node ${key} +| | | Run Keyword If | ',' in '${pid}' +| | | ... | FAIL | More then one VPP PID found on node ${key}: ${pid} | | Set Test Variable | ${setup_vpp_pids} | Check VPP PID in Teardown @@ -358,7 +364,8 @@ | | ... | is printed on console and to log. The test will not fail. | | ... | | ${teardown_vpp_pids}= | Get VPP PIDs | ${nodes} -| | ${err_msg}= | Catenate | \nThe VPP PIDs are not equal!\nTest Setup VPP PIDs: +| | ${err_msg}= | Catenate | ${SUITE NAME} - ${TEST NAME} +| | ... | \nThe VPP PIDs are not equal!\nTest Setup VPP PIDs: | | ... | ${setup_vpp_pids}\nTest Teardown VPP PIDs: ${teardown_vpp_pids} | | ${rc} | ${msg}= | Run keyword and ignore error | | ... | Dictionaries Should Be Equal |