Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Issue 1484253003: [Android] Add record functionality to logcat monitor. (Closed)

Created:
5 years ago by mikecase (-- gone --)
Modified:
5 years ago
CC:
chromium-reviews, jbudorick+watch_chromium.org, klundberg+watch_chromium.org, mikecase+watch_chromium.org, yfriedman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Android] Add record functionality to logcat monitor. Because Android Chromium infra may be switching over to swarming, we will need logic to record logcats that is triggered by individual scripts and not the bots. This is because in the future the bot that trigger the tests may not have the devices attached to them. BUG= Committed: https://crrev.com/fde7a9ac09e8d509c77f0ee20fbb6b93ab93979d Cr-Commit-Position: refs/heads/master@{#365878}

Patch Set 1 #

Total comments: 13

Patch Set 2 : Removed lots of stuff. Addressed jbudorick's comments. #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 8

Patch Set 6 : Addressed comments. #

Patch Set 7 : Use FindAll and WaitFor use the logcat file. #

Patch Set 8 : #

Total comments: 6

Patch Set 9 : Fixed some issues tests found. Added file flushing logic and use unbuffered logcat output. #

Patch Set 10 : Cleanup #

Total comments: 1

Patch Set 11 : #

Patch Set 12 : Fixed behavior of WaitFor #

Total comments: 13

Patch Set 13 : Remove assertions. Raise Exceptions. Add Close() function. #

Total comments: 4

Patch Set 14 : Fixed nits. Use reraiser_thread now. #

Patch Set 15 : Pass device serials to LogcatMonitorCommandErrors. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -24 lines) Patch
M build/android/devil/android/device_utils.py View 1 2 3 4 5 6 1 chunk +1 line, -6 lines 0 comments Download
M build/android/devil/android/logcat_monitor.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +103 lines, -15 lines 0 comments Download
M build/android/devil/android/logcat_monitor_test.py View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +40 lines, -3 lines 0 comments Download

Messages

Total messages: 27 (9 generated)
mikecase (-- gone --)
tempdir.py was lifted straight from https://codereview.chromium.org/1415533007 since I haven't been able to land that yet.. ...
5 years ago (2015-12-01 02:57:46 UTC) #2
mikecase (-- gone --)
https://codereview.chromium.org/1484253003/diff/1/build/android/devil/android/logcat_recorder.py File build/android/devil/android/logcat_recorder.py (right): https://codereview.chromium.org/1484253003/diff/1/build/android/devil/android/logcat_recorder.py#newcode73 build/android/devil/android/logcat_recorder.py:73: device.adb.Logcat(clear=True) Need to probably move this logcat clear call ...
5 years ago (2015-12-01 03:30:34 UTC) #3
jbudorick
https://codereview.chromium.org/1484253003/diff/1/build/android/devil/android/logcat_recorder.py File build/android/devil/android/logcat_recorder.py (right): https://codereview.chromium.org/1484253003/diff/1/build/android/devil/android/logcat_recorder.py#newcode15 build/android/devil/android/logcat_recorder.py:15: from pylib import constants No pylib imports in devil. ...
5 years ago (2015-12-01 03:48:12 UTC) #4
mikecase (-- gone --)
Removed lots of stuff. This CL pretty much just adds functionality for logcat_monitor.py to write ...
5 years ago (2015-12-04 22:45:01 UTC) #6
mikecase (-- gone --)
ping. Pretty short review. Shouldn't take more than 10 mins. Thanks :D :D :D
5 years ago (2015-12-09 01:25:54 UTC) #7
jbudorick
https://codereview.chromium.org/1484253003/diff/80001/build/android/devil/android/logcat_monitor.py File build/android/devil/android/logcat_monitor.py (right): https://codereview.chromium.org/1484253003/diff/80001/build/android/devil/android/logcat_monitor.py#newcode32 build/android/devil/android/logcat_monitor.py:32: self.adb = adb Why self._adb to self.adb? https://codereview.chromium.org/1484253003/diff/80001/build/android/devil/android/logcat_monitor.py#newcode132 build/android/devil/android/logcat_monitor.py:132: ...
5 years ago (2015-12-09 15:33:16 UTC) #8
mikecase (-- gone --)
Addressed comments. Also took the liberty of removing the retry decorator from GetLogcatMonitor (since it ...
5 years ago (2015-12-09 19:43:02 UTC) #9
jbudorick
https://codereview.chromium.org/1484253003/diff/140001/build/android/devil/android/logcat_monitor.py File build/android/devil/android/logcat_monitor.py (right): https://codereview.chromium.org/1484253003/diff/140001/build/android/devil/android/logcat_monitor.py#newcode87 build/android/devil/android/logcat_monitor.py:87: f.seek(0, 2) Having this file open in two places ...
5 years ago (2015-12-15 01:33:03 UTC) #10
mikecase (-- gone --)
Please take a look. Some changes from before... Now flushing logcat file at the beginning ...
5 years ago (2015-12-16 23:52:05 UTC) #11
mikecase (-- gone --)
Fixed behavior of WaitFor. Code can now be much simpler :D
5 years ago (2015-12-17 01:37:40 UTC) #12
mikecase (-- gone --)
https://codereview.chromium.org/1484253003/diff/220001/build/android/devil/android/logcat_monitor.py File build/android/devil/android/logcat_monitor.py (right): https://codereview.chromium.org/1484253003/diff/220001/build/android/devil/android/logcat_monitor.py#newcode87 build/android/devil/android/logcat_monitor.py:87: with open(self._record_file.name, 'r') as f: WaitFor now starts looking ...
5 years ago (2015-12-17 01:40:25 UTC) #13
jbudorick
I'm still concerned about the multiple file handles, especially writing to one and reading to ...
5 years ago (2015-12-17 01:49:05 UTC) #15
mikecase (-- gone --)
Fixed everything you mentioned (except for the having same file open multiple times. That seems ...
5 years ago (2015-12-17 03:13:47 UTC) #16
jbudorick
lgtm w/ nits https://codereview.chromium.org/1484253003/diff/240001/build/android/devil/android/logcat_monitor.py File build/android/devil/android/logcat_monitor.py (right): https://codereview.chromium.org/1484253003/diff/240001/build/android/devil/android/logcat_monitor.py#newcode12 build/android/devil/android/logcat_monitor.py:12: import shutil nit: this is still ...
5 years ago (2015-12-17 17:34:28 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1484253003/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1484253003/260001
5 years ago (2015-12-17 18:05:12 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1484253003/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1484253003/280001
5 years ago (2015-12-17 18:10:33 UTC) #24
commit-bot: I haz the power
Committed patchset #15 (id:280001)
5 years ago (2015-12-17 20:47:52 UTC) #25
commit-bot: I haz the power
5 years ago (2015-12-17 20:48:42 UTC) #27
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/fde7a9ac09e8d509c77f0ee20fbb6b93ab93979d
Cr-Commit-Position: refs/heads/master@{#365878}

Powered by Google App Engine
This is Rietveld 408576698