From 58c7d61bd5ceca0aed2b9e3888d0380970700029 Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Thu, 19 May 2016 13:24:35 +0200 Subject: Fix path for vping.sh and exit if SCP fails Change-Id: I28b394071ae739af60f7e7007cc54e96f13d39db Signed-off-by: jose.lausuch --- testcases/OpenStack/vPing/vPing_ssh.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'testcases') diff --git a/testcases/OpenStack/vPing/vPing_ssh.py b/testcases/OpenStack/vPing/vPing_ssh.py index 5b392e866..4f83b874d 100644 --- a/testcases/OpenStack/vPing/vPing_ssh.py +++ b/testcases/OpenStack/vPing/vPing_ssh.py @@ -393,12 +393,13 @@ def main(): scp = SCPClient(ssh.get_transport()) - ping_script = REPO_PATH + "testcases/vPing/ping.sh" + ping_script = REPO_PATH + "testcases/OpenStack/vPing/ping.sh" try: scp.put(ping_script, "~/") except: logger.error("Cannot SCP the file '%s' to VM '%s'" % (ping_script, floatip)) + return (EXIT_CODE) cmd = 'chmod 755 ~/ping.sh' (stdin, stdout, stderr) = ssh.exec_command(cmd) @@ -427,6 +428,7 @@ def main(): EXIT_CODE = 0 flag = True break + elif sec == PING_TIMEOUT: logger.info("Timeout reached.") flag = True -- cgit 1.2.3-korg