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

Side by Side Diff: build/android/adb_logcat_printer.py

Issue 153743008: Revert of Enable presubmit pylint in build/android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merging with changes to pylib/linker/test_case.py. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/android/adb_logcat_monitor.py ('k') | build/android/adb_profile_chrome.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Shutdown adb_logcat_monitor and print accumulated logs. 7 """Shutdown adb_logcat_monitor and print accumulated logs.
8 8
9 To test, call './adb_logcat_printer.py <base_dir>' where 9 To test, call './adb_logcat_printer.py <base_dir>' where
10 <base_dir> contains 'adb logcat -v threadtime' files named as 10 <base_dir> contains 'adb logcat -v threadtime' files named as
11 logcat_<deviceID>_<sequenceNum> 11 logcat_<deviceID>_<sequenceNum>
12 12
13 The script will print the files to out, and will combine multiple 13 The script will print the files to out, and will combine multiple
14 logcats from a single device if there is overlap. 14 logcats from a single device if there is overlap.
15 15
16 Additionally, if a <base_dir>/LOGCAT_MONITOR_PID exists, the script 16 Additionally, if a <base_dir>/LOGCAT_MONITOR_PID exists, the script
17 will attempt to terminate the contained PID by sending a SIGINT and 17 will attempt to terminate the contained PID by sending a SIGINT and
18 monitoring for the deletion of the aforementioned file. 18 monitoring for the deletion of the aforementioned file.
19 """ 19 """
20 # pylint: disable=W0702
21 20
22 import cStringIO 21 import cStringIO
23 import logging 22 import logging
24 import optparse 23 import optparse
25 import os 24 import os
26 import re 25 import re
27 import signal 26 import signal
28 import sys 27 import sys
29 import time 28 import time
30 29
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 except: 203 except:
205 logger.exception('Unexpected exception') 204 logger.exception('Unexpected exception')
206 205
207 logger.info('Done.') 206 logger.info('Done.')
208 sh.flush() 207 sh.flush()
209 output_file.write('\nLogcat Printer Event Log\n') 208 output_file.write('\nLogcat Printer Event Log\n')
210 output_file.write(log_stringio.getvalue()) 209 output_file.write(log_stringio.getvalue())
211 210
212 if __name__ == '__main__': 211 if __name__ == '__main__':
213 sys.exit(main(sys.argv[1:])) 212 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « build/android/adb_logcat_monitor.py ('k') | build/android/adb_profile_chrome.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698