Merge lp:~liuyq0307/lava-android-test/cts-logcat-hostlog into lp:lava-android-test

Proposed by Yongqin Liu
Status: Merged
Merged at revision: 257
Proposed branch: lp:~liuyq0307/lava-android-test/cts-logcat-hostlog
Merge into: lp:lava-android-test
Diff against target: 49 lines (+23/-6)
2 files modified
lava_android_test/test_definitions/cts.py (+10/-6)
lava_android_test/test_definitions/cts/cts_wrapper.py (+13/-0)
To merge this branch: bzr merge lp:~liuyq0307/lava-android-test/cts-logcat-hostlog
Reviewer Review Type Date Requested Status
Yongqin Liu self test Approve
Review via email: mp+168274@code.launchpad.net

Description of the change

add the host_log and device_logcat log of CTS test into the result as attachment.

To post a comment you must log in.
Revision history for this message
Yongqin Liu (liuyq0307) :
review: Approve (self test)

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.py'
--- lava_android_test/test_definitions/cts.py 2013-06-03 08:35:02 +0000
+++ lava_android_test/test_definitions/cts.py 2013-06-09 07:34:25 +0000
@@ -52,13 +52,17 @@
52 fixupdict={'PASS': 'pass', 'FAIL': 'fail'})52 fixupdict={'PASS': 'pass', 'FAIL': 'fail'})
5353
54attachments = [54attachments = [
55 Attachment(pathname="/data/local/tmp/logcat.log",55 Attachment(pathname="/data/local/tmp/logcat.log",
56 mime_type="text/plain"),56 mime_type="text/plain"),
57 Attachment(pathname="/data/local/tmp/kmsg.log",57 Attachment(pathname="/data/local/tmp/kmsg.log",
58 mime_type="text/plain"),58 mime_type="text/plain"),
59 Attachment(pathname="/data/local/tmp/cts-results.zip",59 Attachment(pathname="/data/local/tmp/cts-results.zip",
60 mime_type="application/zip"),
61 Attachment(pathname="/data/local/tmp/device_logcat.zip",
62 mime_type="application/zip"),
63 Attachment(pathname="/data/local/tmp/host_log.zip",
60 mime_type="application/zip")64 mime_type="application/zip")
61 ]65 ]
62testobj = AndroidTest(testname=test_name,66testobj = AndroidTest(testname=test_name,
63 installer=inst,67 installer=inst,
64 runner=run,68 runner=run,
6569
=== modified file 'lava_android_test/test_definitions/cts/cts_wrapper.py'
--- lava_android_test/test_definitions/cts/cts_wrapper.py 2013-06-03 08:35:02 +0000
+++ lava_android_test/test_definitions/cts/cts_wrapper.py 2013-06-09 07:34:25 +0000
@@ -61,6 +61,19 @@
61 if ret_code != 0:61 if ret_code != 0:
62 print "Failed to push file %s to device(%s)" % (zip_f,62 print "Failed to push file %s to device(%s)" % (zip_f,
63 adb.get_serial())63 adb.get_serial())
64 log_target_dir = os.path.join(os.getcwd(),
65 './android-cts/repository/logs/')
66 for zip_f in find_files(log_target_dir, '.zip'):
67 base_name = os.path.basename(zip_f)
68 if base_name.startswith('device_logcat_'):
69 base_name = 'device_logcat.zip'
70 if base_name.startswith('host_log_'):
71 base_name = 'host_log.zip'
72
73 ret_code = adb.push(zip_f, '/data/local/tmp/%s' % base_name)[0]
74 if ret_code != 0:
75 print "Failed to push file %s to device(%s)" % (zip_f,
76 adb.get_serial())
64 return result77 return result
6578
6679

Subscribers

People subscribed via source and target branches