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

Issue 25679007: Add a new script forked_adb_logcat_monitor.py. (Closed)

Created:
7 years, 2 months ago by Siva Chandra
Modified:
7 years, 2 months ago
CC:
chromium-reviews, craigdh+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, ilevy-cc_chromium.org, klundberg+watch_chromium.org, frankf+watch_chromium.org
Visibility:
Public.

Description

Add a new script forked_adb_logcat_monitor.py. The new script is based on the existing script adb_logcat_monitor.py. The difference is that the new script spawns the logcat watchers in a different forked process. Revision 6f2240ded5a22b6e3f75437966ea632b90362448 (https://chromiumcodereview.appspot.com/24456002/) added something similar to adb_logcat_monitor.py itself, but it was found to be insufficient for the recipes framework. Essentially, the recipes system expects the standard streams to be closed at the end of a step. To avoid adding more clutter to the existing script, this CL reverts the previous changes to adb_logcat_monitor.py and adds a new script to handle the recipe requirements. Also, as mentioned above, if we put these changes in one script (adb_logcat_monitor.py), I am hitting problems with the existing annotator scripts which use adb_logcat_monitor.py. BUG=286509

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -12 lines) Patch
M build/android/adb_logcat_monitor.py View 2 chunks +2 lines, -11 lines 0 comments Download
M build/android/buildbot/bb_device_steps.py View 1 chunk +1 line, -1 line 0 comments Download
A build/android/forked_adb_logcat_monitor.py View 1 chunk +60 lines, -0 lines 2 comments Download

Messages

Total messages: 5 (0 generated)
Siva Chandra
I abandoning the other CL as the try jobs, though green, were having logcat monitor ...
7 years, 2 months ago (2013-10-03 22:10:58 UTC) #1
Siva Chandra
BTW, the new script is based on this: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
7 years, 2 months ago (2013-10-03 23:10:17 UTC) #2
navabi
https://chromiumcodereview.appspot.com/25679007/diff/1/build/android/forked_adb_logcat_monitor.py File build/android/forked_adb_logcat_monitor.py (right): https://chromiumcodereview.appspot.com/25679007/diff/1/build/android/forked_adb_logcat_monitor.py#newcode20 build/android/forked_adb_logcat_monitor.py:20: if __name__ == '__main__': move the body of this ...
7 years, 2 months ago (2013-10-03 23:51:04 UTC) #3
Isaac (away)
On 2013/10/03 22:10:58, Siva Chandra wrote: > I abandoning the other CL as the try ...
7 years, 2 months ago (2013-10-04 00:56:03 UTC) #4
iannucci
7 years, 2 months ago (2013-10-04 01:33:31 UTC) #5
On 2013/10/04 00:56:03, Isaac wrote:
> On 2013/10/03 22:10:58, Siva Chandra wrote:
> > I abandoning the other CL as the try jobs, though green, were having logcat
> > monitor problems. This CL reverts all forking changes to
adb_logcat_monitor.py
> > and adds a new script which can be used from recipes.
> 
> Please do the revert in a separate CL so it is not blocked on a review and
does
> not risk getting rolled back.
> 

Probably a good idea :)

> 
> > 
> > Tested locally. Try jobs in queue.
> 
> forked_adb_logcat_monitor.py looks like a general daemon launcher.  I'd prefer
> we not name utilities based on how they are used.  Instead, how about writing
a
> general class, perhaps just using:
> http://code.activestate.com/recipes/278731-creating-a-daemon-the-python-way/ ?

Yeah we should have some sort of daemon class as a library somewhere.

Powered by Google App Engine
This is Rietveld 408576698