Upload CSChrome crash reports to crash.

This will upload crashes to staging.
Example report:
https://crash-staging.corp.google.com/browse?q=reportid=%2732b1540312c908a3%27
Adding product keys will be done in another CL.

Bug: 751134
Change-Id: I9a8446be5314be39afd2053060c30ed7a19c4b2e
Reviewed-on: https://chromium-review.googlesource.com/616565
Reviewed-by: Mark Cogan <marq@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#495951}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 96ed6102741ace7d9981a7578c0bc84d7b156b38
This commit is contained in:
Olivier Robin 2017-08-21 16:14:43 +00:00 коммит произвёл Commit Bot
Родитель a049c43089
Коммит fa1b6de867
1 изменённых файлов: 12 добавлений и 5 удалений

Просмотреть файл

@ -158,13 +158,16 @@ def _DoSCMKeys(plist, add_keys):
return True
def _AddBreakpadKeys(plist, branding, platform):
def _AddBreakpadKeys(plist, branding, platform, staging):
"""Adds the Breakpad keys. This must be called AFTER _AddVersionKeys() and
also requires the |branding| argument."""
plist['BreakpadReportInterval'] = '3600' # Deliberately a string.
plist['BreakpadProduct'] = '%s_%s' % (branding, platform)
plist['BreakpadProductDisplay'] = branding
plist['BreakpadURL'] = 'https://clients2.google.com/cr/report'
if staging:
plist['BreakpadURL'] = 'https://clients2.google.com/cr/staging_report'
else:
plist['BreakpadURL'] = 'https://clients2.google.com/cr/report'
# These are both deliberately strings and not boolean.
plist['BreakpadSendAndExit'] = 'YES'
@ -236,6 +239,9 @@ def Main(argv):
'the tweaked plist, rather than overwriting the input.')
parser.add_option('--breakpad', dest='use_breakpad', action='store',
type='int', default=False, help='Enable Breakpad [1 or 0]')
parser.add_option('--breakpad_staging', dest='use_breakpad_staging',
action='store_true', default=False,
help='Use staging breakpad to upload reports. Ignored if --breakpad=0.')
parser.add_option('--keystone', dest='use_keystone', action='store',
type='int', default=False, help='Enable Keystone [1 or 0]')
parser.add_option('--scm', dest='add_scm_info', action='store', type='int',
@ -322,10 +328,11 @@ def Main(argv):
if options.branding is None:
print >>sys.stderr, 'Use of Breakpad requires branding.'
return 1
# Map gyp "OS" / gn "target_os" passed via the --platform parameter to
# the platform as known by breakpad.
# Map "target_os" passed from gn via the --platform parameter
# to the platform as known by breakpad.
platform = {'mac': 'Mac', 'ios': 'iOS'}[options.platform]
_AddBreakpadKeys(plist, options.branding, platform)
_AddBreakpadKeys(plist, options.branding, platform,
options.use_breakpad_staging)
else:
_RemoveBreakpadKeys(plist)