aboutsummaryrefslogtreecommitdiff
path: root/lava_android_test/test_definitions/cts/cts_wrapper.py
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2015-01-15 00:29:00 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2015-01-15 00:29:00 +0800
commitcbc96faf8c5d47569b87acfa63b642e617194167 (patch)
treecd4a09c040af1b34bbfd50dae4d8f4145aa2918b /lava_android_test/test_definitions/cts/cts_wrapper.py
parent6361bdb23ab814c46e61fa5c2f0162534ae0639c (diff)
downloadlava-android-test-cbc96faf8c5d47569b87acfa63b642e617194167.tar.gz
add run_cts_continue to make sure cts can be run to complete
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Diffstat (limited to 'lava_android_test/test_definitions/cts/cts_wrapper.py')
-rwxr-xr-xlava_android_test/test_definitions/cts/cts_wrapper.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/lava_android_test/test_definitions/cts/cts_wrapper.py b/lava_android_test/test_definitions/cts/cts_wrapper.py
index b035c35..2ba9ccd 100755
--- a/lava_android_test/test_definitions/cts/cts_wrapper.py
+++ b/lava_android_test/test_definitions/cts/cts_wrapper.py
@@ -90,19 +90,20 @@ def get_not_executed():
list_result_path = os.path.join(curdir, 'cts_list_result_wrapper.sh')
list_result_cmd = "bash %s" % list_result_path
- pattern = 'CTS unknown'
+ pattern = 'All done'
if not stop_at_pattern(command=list_result_cmd,
- pattern=pattern, timeout=5):
+ pattern=pattern, timeout=60):
print "Failed to list the cts result for device(%s)" % adb.get_serial()
with open('cts_list_results.log') as fd:
#0 17237 126 0 2012.06.23_03.31.49 CTS unknown
- pattern = ("\s*\d+\s+\d+\s+\d+\s+(?P<no_executed>\d+)"
- "\s+.+CTS\s+unknown\s*$")
+ pattern = ("^\s*\d+\s+\d+\s+\d+\s+(?P<no_executed>\d+)"
+ "\s+\S+\s+\S+\s+unknown\s*$")
pat = re.compile(pattern)
for line in fd.readlines():
match = pat.search(line)
if not match:
+ print line.rstrip()
continue
return match.groupdict()['no_executed']
return 0
@@ -166,7 +167,7 @@ def run_cts_with_class(cts_cmd=None, cls=None, method=None, timeout=36000):
return True
-def run_cts_continue(cts_cmd=None):
+def run_cts_continue(cts_cmd=None, timeout=360000):
pattern = "Time:"
continue_command = '--continue-session 0'
if cts_cmd:
@@ -187,7 +188,7 @@ def run_cts_continue(cts_cmd=None):
if not stop_at_cts_pattern(command=continue_command,
pattern=pattern,
- timeout=36000):
+ timeout=timeout):
print "CTS test times out"
else:
break
@@ -338,6 +339,8 @@ def main():
run_cts_with_plan(cts_cmd=run_wrapper_cmd, plan=plan_name,
timeout=timeout)
+ run_cts_continue(cts_cmd=run_wrapper_cmd)
+
finally:
for log in logs:
pid = log.get('pid')