diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-01-04 14:17:57 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-01-05 10:05:06 +0000 |
commit | 39d357e3248f80abea0159765ff39554affb40db (patch) | |
tree | aba0e6bfb76de0244bba0f5fdbd64b830dd6e621 /chromium/tools/roll_webrtc.py | |
parent | 87778abf5a1f89266f37d1321b92a21851d8244d (diff) | |
download | qtwebengine-chromium-39d357e3248f80abea0159765ff39554affb40db.tar.gz |
BASELINE: Update Chromium to 55.0.2883.105
And updates ninja to 1.7.2
Change-Id: I20d43c737f82764d857ada9a55586901b18b9243
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/tools/roll_webrtc.py')
-rwxr-xr-x | chromium/tools/roll_webrtc.py | 60 |
1 files changed, 38 insertions, 22 deletions
diff --git a/chromium/tools/roll_webrtc.py b/chromium/tools/roll_webrtc.py index 4291c3820f5..24885652d9b 100755 --- a/chromium/tools/roll_webrtc.py +++ b/chromium/tools/roll_webrtc.py @@ -37,8 +37,10 @@ TRYJOB_STATUS_SLEEP_SECONDS = 30 IS_WIN = sys.platform.startswith('win') WEBRTC_PATH = os.path.join('third_party', 'webrtc') # Run these CQ trybots in addition to the default ones in infra/config/cq.cfg. -EXTRA_TRYBOTS = ('tryserver.chromium.linux:linux_chromium_archive_rel_ng;' - 'tryserver.chromium.mac:mac_chromium_archive_rel_ng') +EXTRA_TRYBOTS = ( + 'master.tryserver.chromium.linux:linux_chromium_archive_rel_ng;' + 'master.tryserver.chromium.mac:mac_chromium_archive_rel_ng' +) # Result codes from build/third_party/buildbot_8_4p1/buildbot/status/results.py # plus the -1 code which is used when there's no result yet. @@ -152,24 +154,6 @@ def _PrintTrybotsStatus(tryjob_results): for status,name_list in status_to_name.iteritems(): print '%s: %s' % (status, ','.join(sorted(name_list))) - -def _GenerateCLDescriptionCommand(webrtc_current, webrtc_new): - def GetChangeLogURL(git_repo_url, current_hash, new_hash): - return '%s/+log/%s..%s' % (git_repo_url, current_hash[0:7], new_hash[0:7]) - - webrtc_str = 'WebRTC %s:%s' % (webrtc_current.commit_position, - webrtc_new.commit_position) - webrtc_changelog_url = GetChangeLogURL(webrtc_current.git_repo_url, - webrtc_current.git_commit, - webrtc_new.git_commit) - - description = [ '-m', 'Roll ' + webrtc_str ] - description.extend(['-m', 'Changes: %s' % webrtc_changelog_url]) - description.extend(['-m', 'TBR=']) - description.extend(['-m', 'CQ_EXTRA_TRYBOTS=%s' % EXTRA_TRYBOTS]) - return description - - class AutoRoller(object): def __init__(self, chromium_src): self._chromium_src = chromium_src @@ -199,6 +183,38 @@ class AutoRoller(object): sys.exit(p.returncode) return output + def _GenerateCLDescriptionCommand(self, webrtc_current, webrtc_new): + commit_range = '%s..%s' % (webrtc_current.git_commit[:7], + webrtc_new.git_commit[:7]) + + webrtc_changelog_url = '%s/+log/%s' % (webrtc_current.git_repo_url, + commit_range) + + git_log_cmd = ['git', 'log', commit_range, '--date=short', '--no-merges', + '--format=%ad %ae %s'] + + working_dir = os.path.join(self._chromium_src, WEBRTC_PATH) + git_log = self._RunCommand(git_log_cmd, working_dir=working_dir) + + nb_commits = git_log.count('\n') + webrtc_header = 'Roll WebRTC %s:%s (%d commit%s)' % ( + webrtc_current.commit_position, webrtc_new.commit_position, + nb_commits, 's' if nb_commits > 1 else '') + + description = ('%s\n\n' + 'Changes: %s\n\n' + '$ %s\n' + '%s\n' + 'TBR=\n' + 'CQ_INCLUDE_TRYBOTS=%s\n') % ( + webrtc_header, + webrtc_changelog_url, + ' '.join(git_log_cmd), + git_log, + EXTRA_TRYBOTS) + + return description + def _GetCommitInfo(self, path_below_src, git_hash=None, git_repo_url=None): working_dir = os.path.join(self._chromium_src, path_below_src) self._RunCommand(['git', 'fetch', 'origin'], working_dir=working_dir) @@ -296,11 +312,11 @@ class AutoRoller(object): print 'The latest revision is already rolled for WebRTC.' self._DeleteRollBranch() else: - description = _GenerateCLDescriptionCommand( + description = self._GenerateCLDescriptionCommand( webrtc_current, webrtc_latest) logging.debug('Committing changes locally.') self._RunCommand(['git', 'add', '--update', '.']) - self._RunCommand(['git', 'commit'] + description) + self._RunCommand(['git', 'commit', '-m', description]) logging.debug('Uploading changes...') self._RunCommand(['git', 'cl', 'upload'], extra_env={'EDITOR': 'true'}) |