Merge lp:~liuyq0307/lava-android-test/cts-4_1_r1 into lp:lava-android-test

Proposed by Yongqin Liu
Status: Merged
Merged at revision: 212
Proposed branch: lp:~liuyq0307/lava-android-test/cts-4_1_r1
Merge into: lp:lava-android-test
Diff against target: 93 lines (+45/-5)
2 files modified
lava_android_test/test_definitions/cts/cts_prepare.sh (+3/-3)
lava_android_test/test_definitions/cts/cts_wrapper.py (+42/-2)
To merge this branch: bzr merge lp:~liuyq0307/lava-android-test/cts-4_1_r1
Reviewer Review Type Date Requested Status
Linaro Validation Team Pending
Review via email: mp+128429@code.launchpad.net

Description of the change

update to use the latest 4.1.r1 package that google provided

To post a comment you must log in.
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I don't feel particularly qualified to review this, but it looks OK I
guess. We're not actually running CTS currently, right?

Revision history for this message
Yongqin Liu (liuyq0307) wrote :

> I don't feel particularly qualified to review this, but it looks OK I
> guess. We're not actually running CTS currently, right?

Yes, we are not running the CTS because the bug it consumes the CPU.
But this branch is not for that problem, it is just updated to use the latest cts-4_1_r1 CTS package.

And I want to investigate the CTS consumes CPU problem based on this branch with the latest CTS package

Revision history for this message
Yongqin Liu (liuyq0307) wrote :

Sorry, this is the CTS consumes CPU bug:
https://bugs.launchpad.net/linaro-android/+bug/1034218

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Yongqin Liu <email address hidden> writes:

>> I don't feel particularly qualified to review this, but it looks OK I
>> guess. We're not actually running CTS currently, right?
>
> Yes, we are not running the CTS because the bug it consumes the CPU.
> But this branch is not for that problem, it is just updated to use the latest cts-4_1_r1 CTS package.
>
> And I want to investigate the CTS consumes CPU problem based on this branch with the latest CTS package

Fair enough. Merge away then :-)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lava_android_test/test_definitions/cts/cts_prepare.sh'
--- lava_android_test/test_definitions/cts/cts_prepare.sh 2012-06-26 03:38:38 +0000
+++ lava_android_test/test_definitions/cts/cts_prepare.sh 2012-10-08 07:12:20 +0000
@@ -20,9 +20,9 @@
2020
21#http://source.android.com/compatibility/downloads.html21#http://source.android.com/compatibility/downloads.html
2222
23cts_pkg="android-cts-4.0.3_r3-linux_x86-arm.zip"23cts_pkg="android-cts-linux_x86-arm-latest.zip"
24media_pkg="android-cts-media-1.0.zip"24media_pkg="android-cts-media-latest.zip"
25site_url="https://dl.google.com/dl/android/cts/"25site_url="http://testdata.validation.linaro.org/cts/"
26#site_url="http://192.168.1.127/images/cts/"26#site_url="http://192.168.1.127/images/cts/"
27#export http_proxy=http://localhost:312827#export http_proxy=http://localhost:3128
2828
2929
=== modified file 'lava_android_test/test_definitions/cts/cts_wrapper.py'
--- lava_android_test/test_definitions/cts/cts_wrapper.py 2012-06-27 08:32:16 +0000
+++ lava_android_test/test_definitions/cts/cts_wrapper.py 2012-10-08 07:12:20 +0000
@@ -22,6 +22,7 @@
22import os22import os
23import re23import re
24import sys24import sys
25import xml.dom.minidom
25from lava_android_test.adb import ADB26from lava_android_test.adb import ADB
26from lava_android_test.utils import stop_at_pattern27from lava_android_test.utils import stop_at_pattern
2728
@@ -75,6 +76,21 @@
75 return True76 return True
7677
7778
79def run_cts_with_package(cts_cmd=None, package=None):
80 pattern = "I/CommandScheduler: All done"
81 if not package:
82 return False
83 package_command = '--package %s' % package
84 if cts_cmd:
85 cts_command = "%s %s" % (cts_cmd, package_command)
86 if not stop_at_pattern(command=cts_command, pattern=pattern,
87 timeout=36000):
88 print "CTS test times out"
89 return False
90
91 return True
92
93
78def run_cts_continue(cts_cmd=None):94def run_cts_continue(cts_cmd=None):
79 pattern = "Time:"95 pattern = "Time:"
80 continue_command = '--continue-session 0'96 continue_command = '--continue-session 0'
@@ -147,6 +163,26 @@
147 print '<<<<<=========Log file [%s] ends=========' % log_file163 print '<<<<<=========Log file [%s] ends=========' % log_file
148164
149165
166def get_all_packages(plan_file=None):
167 if not plan_file:
168 return []
169 if not os.path.exists(plan_file):
170 print "file(%s) does not exist" % plan_file
171 return []
172
173 package_list = []
174 try:
175 dom = xml.dom.minidom.parse(plan_file)
176 test_plan = dom.getElementsByTagName("TestPlan")[0]
177 for entry in test_plan.getElementsByTagName("Entry"):
178 package_list.append(entry.attributes.get('uri').value)
179 except Exception as e:
180 print "Has exception to parse the xml file"
181 print "Exception: %s" % e
182 finally:
183 return package_list
184
185
150def main():186def main():
151 run_wrapper_path = os.path.join(curdir, 'cts_run_wrapper.sh')187 run_wrapper_path = os.path.join(curdir, 'cts_run_wrapper.sh')
152 run_wrapper_cmd = "bash %s" % run_wrapper_path188 run_wrapper_cmd = "bash %s" % run_wrapper_path
@@ -156,9 +192,13 @@
156 logs = collect_logs()192 logs = collect_logs()
157 if not prepare_cts():193 if not prepare_cts():
158 sys.exit(1)194 sys.exit(1)
195
196 cts_plan = './android-cts/repository/plans/CTS.xml'
197 pkg_list = get_all_packages(plan_file=cts_plan)
159 try:198 try:
160 run_cts_with_plan(run_wrapper_cmd)199 for pkg in pkg_list:
161 run_cts_continue(run_wrapper_cmd)200 if not run_cts_with_package(cts_cmd=run_wrapper_cmd, package=pkg):
201 run_cts_continue(run_wrapper_cmd)
162 finally:202 finally:
163 for log in logs:203 for log in logs:
164 pid = log.get('pid')204 pid = log.get('pid')

Subscribers

People subscribed via source and target branches