aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/DUTSetup.py
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2017-05-29 12:07:58 +0200
committerJan Gelety <jgelety@cisco.com>2017-05-30 10:01:08 +0000
commit43e7440a3fea2125ecb8d6d1f4ee7f69bbf9f3ac (patch)
tree0e2156f882bd6fd03f8a40a9253fd65a02e2256f /resources/libraries/python/DUTSetup.py
parent39311c05e6a056a3f33ec2cf050a00665c8f4540 (diff)
Do not fail test case when no vpp pid detected in the tear down
- currently when no pid (or more pids) detected in the test case tear down of successfully run test case not only the WARN message is logged but the whole test case is failed - to change this behaviour but keep test case failure if no vpp pid (or more vpp pids) detected in test case setup the low level KW "Get VPP PID" behaviour has been changed to return one or more pids or None w/o raising an error and check has been moved to higher level KW "Save VPP PIDs" - there was added suite name and test case name to WARN message when no pid or more pids detected in the test case tear down Change-Id: I04f8d81c1ca48a1e4a45bd0e58f00d36d51c6933 Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries/python/DUTSetup.py')
-rw-r--r--resources/libraries/python/DUTSetup.py13
1 files changed, 9 insertions, 4 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):