summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Bhoj <vishal.bhoj@linaro.org>2017-05-08 11:25:05 +0530
committerNaresh Kamboju <naresh.kamboju@linaro.org>2017-05-08 07:24:09 +0000
commit747fe57b9571e7cb3f177cdd68f1e8d995cf01a7 (patch)
tree6379230880416aea3aefcd84aadedc25a4c2d1e5
parent0fd41f9b0b65c17782e1a4b8cb5826b3af6eaec6 (diff)
android: tradefed: Wait for 5 minutes before terminating
tradefed itself will finish execution if device is not available anymore so lets give 5 minutes for execution to finish Change-Id: I2423ce7706ac0518792183aa4c890dfe381eed82 Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rwxr-xr-xautomated/android/tradefed/tradefed-runner.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/automated/android/tradefed/tradefed-runner.py b/automated/android/tradefed/tradefed-runner.py
index dff16a6..dde8abc 100755
--- a/automated/android/tradefed/tradefed-runner.py
+++ b/automated/android/tradefed/tradefed-runner.py
@@ -11,6 +11,7 @@ import xml.etree.ElementTree as ET
import pexpect
import argparse
import logging
+import time
sys.path.insert(0, '../../lib/')
import py_test_lib # nopep8
@@ -142,7 +143,8 @@ while child.isalive():
adb_check = subprocess.Popen(shlex.split(adb_command))
if adb_check.wait() != 0:
subprocess.call(['adb', 'devices'])
- logger.error('Terminating tradefed shell test as adb connection is lost!')
+ logger.error('adb connection lost!! Will wait for 5 minutes and terminating tradefed shell test as adb connection is lost!')
+ time.sleep(300)
child.terminate(force=True)
result = 'check-adb-connectivity fail'
py_test_lib.add_result(RESULT_FILE, result)