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

Side by Side Diff: upload_debug_syms.py

Issue 2812012: Add symbol uploader (Closed) Base URL: ssh://git@chromiumos-git//crosutils.git
Patch Set: Respond to review Created 10 years, 6 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 | « no previous file | upload_symbols » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/python
2
3 ''' Utility to upload debug symbols to the Google Breakpad Server '''
4
5 import os
6 import subprocess
7 import sys
8
9 # Common Global Variables
10 DEBUG_BASE_PATH='/build'
11 DEBUG_SUBPATH='/usr/lib/debug'
12 DEBUG_EXT='.sym'
13 BP_UPLOAD=('../third_party/google-breakpad/'
14 'files/src/tools/linux/symupload/symupload')
15
16 def CheckBinaryExists():
17 if os.path.exists(BP_UPLOAD):
18 return True
19 return False
20
21 def FindDebugFiles():
22
23 curdir = os.curdir
24 if not os.path.exists("/etc/debian_chroot"):
25 DEBUG_BASE_PATH= sys.argv[0] + '/../../chroot/build'
26
27 files = []
28 for dirpath, dirnames, filenames in os.walk(DEBUG_BASE_PATH):
29 filenames[:] = [os.path.join(dirpath, fname)
30 for fname in filenames if fname.endswith(DEBUG_EXT)]
31 files.extend(filenames)
32 return files
33
34 def Upload(filenames=[]):
35
36 for filename in filenames:
37 print 'executing..' + BP_UPLOAD + ' ' + filename
38 retval = subprocess.call([BPUPLOAD, filename])
39 print retval
40 print 'done.'
41
42 def Main():
43 if not CheckBinaryExists():
44 print "Could not find Breakpad Upload Binary at : %s " % BP_UPLOAD
45 return
46
47 filenames = FindDebugFiles()
48 Upload(filenames)
49
50 if __name__ == '__main__':
51 Main()
OLDNEW
« no previous file with comments | « no previous file | upload_symbols » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698