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

Side by Side Diff: ppapi/native_client/tests/breakpad_crash_test/crash_dump_tester.py

Issue 11969025: Enable breakpad building by default on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/env_vars.cc ('k') | ppapi/native_client/tools/browser_tester/browser_tester.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/python 1 #!/usr/bin/python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 import subprocess 7 import subprocess
8 import sys 8 import sys
9 import tempfile 9 import tempfile
10 import time 10 import time
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 elif sys.platform == 'darwin': 134 elif sys.platform == 'darwin':
135 dumps_dir = temp_dir 135 dumps_dir = temp_dir
136 os.environ['BREAKPAD_DUMP_LOCATION'] = dumps_dir 136 os.environ['BREAKPAD_DUMP_LOCATION'] = dumps_dir
137 elif sys.platform.startswith('linux'): 137 elif sys.platform.startswith('linux'):
138 # The "--user-data-dir" option is not effective for the Breakpad 138 # The "--user-data-dir" option is not effective for the Breakpad
139 # setup in Linux Chromium, because Breakpad is initialized before 139 # setup in Linux Chromium, because Breakpad is initialized before
140 # "--user-data-dir" is read. So we set HOME to redirect the crash 140 # "--user-data-dir" is read. So we set HOME to redirect the crash
141 # dumps to a temporary directory. 141 # dumps to a temporary directory.
142 home_dir = temp_dir 142 home_dir = temp_dir
143 os.environ['HOME'] = home_dir 143 os.environ['HOME'] = home_dir
144 # On Linux, we also need to set CHROME_ENABLE_BREAKPAD. 144 options.enable_crash_reporter = True
145 os.environ['CHROME_ENABLE_BREAKPAD'] = '1'
146 145
147 result = browser_tester.Run(options.url, options) 146 result = browser_tester.Run(options.url, options)
148 147
149 # Find crash dump results. 148 # Find crash dump results.
150 if sys.platform.startswith('linux'): 149 if sys.platform.startswith('linux'):
151 # Look in "~/.config/*/Crash Reports". This will find crash 150 # Look in "~/.config/*/Crash Reports". This will find crash
152 # reports under ~/.config/chromium or ~/.config/google-chrome, or 151 # reports under ~/.config/chromium or ~/.config/google-chrome, or
153 # under other subdirectories in case the branding is changed. 152 # under other subdirectories in case the branding is changed.
154 dumps_dirs = [os.path.join(path, 'Crash Reports') 153 dumps_dirs = [os.path.join(path, 'Crash Reports')
155 for path in ListPathsInDir(os.path.join(home_dir, '.config'))] 154 for path in ListPathsInDir(os.path.join(home_dir, '.config'))]
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 cleanup_funcs = [] 208 cleanup_funcs = []
210 try: 209 try:
211 return Main(cleanup_funcs) 210 return Main(cleanup_funcs)
212 finally: 211 finally:
213 for func in cleanup_funcs: 212 for func in cleanup_funcs:
214 func() 213 func()
215 214
216 215
217 if __name__ == '__main__': 216 if __name__ == '__main__':
218 sys.exit(MainWrapper()) 217 sys.exit(MainWrapper())
OLDNEW
« no previous file with comments | « chrome/common/env_vars.cc ('k') | ppapi/native_client/tools/browser_tester/browser_tester.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698