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

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

Issue 132463007: Enable presubmit pylint in build/android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase vs tot and only disabling F0401 in specific spots 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
20 21
21 import cStringIO 22 import cStringIO
22 import logging 23 import logging
23 import optparse 24 import optparse
24 import os 25 import os
25 import re 26 import re
26 import signal 27 import signal
27 import sys 28 import sys
28 import time 29 import time
29 30
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 except: 204 except:
204 logger.exception('Unexpected exception') 205 logger.exception('Unexpected exception')
205 206
206 logger.info('Done.') 207 logger.info('Done.')
207 sh.flush() 208 sh.flush()
208 output_file.write('\nLogcat Printer Event Log\n') 209 output_file.write('\nLogcat Printer Event Log\n')
209 output_file.write(log_stringio.getvalue()) 210 output_file.write(log_stringio.getvalue())
210 211
211 if __name__ == '__main__': 212 if __name__ == '__main__':
212 sys.exit(main(sys.argv[1:])) 213 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