OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
3 # | 3 # |
4 # Use of this source code is governed by a BSD-style license | 4 # Use of this source code is governed by a BSD-style license |
5 # that can be found in the LICENSE file in the root of the source | 5 # that can be found in the LICENSE file in the root of the source |
6 # tree. An additional intellectual property rights grant can be found | 6 # tree. An additional intellectual property rights grant can be found |
7 # in the file PATENTS. All contributing project authors may | 7 # in the file PATENTS. All contributing project authors may |
8 # be found in the AUTHORS file in the root of the source tree. | 8 # be found in the AUTHORS file in the root of the source tree. |
9 | 9 |
10 """Script to automatically roll dependencies in the WebRTC DEPS file.""" | 10 """Script to automatically roll dependencies in the WebRTC DEPS file.""" |
11 | 11 |
12 import argparse | 12 import argparse |
13 import base64 | 13 import base64 |
14 import collections | 14 import collections |
15 import logging | 15 import logging |
16 import os | 16 import os |
17 import re | 17 import re |
18 import subprocess | 18 import subprocess |
19 import sys | 19 import sys |
20 import urllib | 20 import urllib |
21 | 21 |
22 | 22 |
23 # Skip these dependencies (list without solution name prefix). | 23 # Skip these dependencies (list without solution name prefix). |
24 DONT_AUTOROLL_THESE = [ | 24 DONT_AUTOROLL_THESE = [ |
25 'src/third_party/gflags/src', | 25 'src/third_party/gflags/src', |
26 'src/third_party/winsdk_samples', | 26 'src/third_party/winsdk_samples', |
27 'src/webrtc/examples/androidtests/third_party/gradle', | 27 'src/webrtc/examples/androidtests/third_party/gradle', |
28 ] | 28 ] |
29 | 29 |
| 30 # Run these CQ trybots in addition to the default ones in infra/config/cq.cfg. |
| 31 EXTRA_TRYBOTS = ( |
| 32 'master.internal.tryserver.corp.webrtc:linux_internal' |
| 33 ) |
| 34 |
30 WEBRTC_URL = 'https://chromium.googlesource.com/external/webrtc' | 35 WEBRTC_URL = 'https://chromium.googlesource.com/external/webrtc' |
31 CHROMIUM_SRC_URL = 'https://chromium.googlesource.com/chromium/src' | 36 CHROMIUM_SRC_URL = 'https://chromium.googlesource.com/chromium/src' |
32 CHROMIUM_COMMIT_TEMPLATE = CHROMIUM_SRC_URL + '/+/%s' | 37 CHROMIUM_COMMIT_TEMPLATE = CHROMIUM_SRC_URL + '/+/%s' |
33 CHROMIUM_LOG_TEMPLATE = CHROMIUM_SRC_URL + '/+log/%s' | 38 CHROMIUM_LOG_TEMPLATE = CHROMIUM_SRC_URL + '/+log/%s' |
34 CHROMIUM_FILE_TEMPLATE = CHROMIUM_SRC_URL + '/+/%s/%s' | 39 CHROMIUM_FILE_TEMPLATE = CHROMIUM_SRC_URL + '/+/%s/%s' |
35 | 40 |
36 COMMIT_POSITION_RE = re.compile('^Cr-Commit-Position: .*#([0-9]+).*$') | 41 COMMIT_POSITION_RE = re.compile('^Cr-Commit-Position: .*#([0-9]+).*$') |
37 CLANG_REVISION_RE = re.compile(r'^CLANG_REVISION = \'(\d+)\'$') | 42 CLANG_REVISION_RE = re.compile(r'^CLANG_REVISION = \'(\d+)\'$') |
38 ROLL_BRANCH_NAME = 'roll_chromium_revision' | 43 ROLL_BRANCH_NAME = 'roll_chromium_revision' |
39 | 44 |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 commit_msg.append('Clang version changed %s:%s' % | 312 commit_msg.append('Clang version changed %s:%s' % |
308 (clang_change.current_rev, clang_change.new_rev)) | 313 (clang_change.current_rev, clang_change.new_rev)) |
309 change_url = CHROMIUM_FILE_TEMPLATE % (rev_interval, | 314 change_url = CHROMIUM_FILE_TEMPLATE % (rev_interval, |
310 CLANG_UPDATE_SCRIPT_URL_PATH) | 315 CLANG_UPDATE_SCRIPT_URL_PATH) |
311 commit_msg.append('Details: %s\n' % change_url) | 316 commit_msg.append('Details: %s\n' % change_url) |
312 else: | 317 else: |
313 commit_msg.append('No update to Clang.\n') | 318 commit_msg.append('No update to Clang.\n') |
314 | 319 |
315 commit_msg.append('TBR=%s' % tbr_authors) | 320 commit_msg.append('TBR=%s' % tbr_authors) |
316 commit_msg.append('BUG=None') | 321 commit_msg.append('BUG=None') |
| 322 commit_msg.append('CQ_INCLUDE_TRYBOTS=%s' % EXTRA_TRYBOTS) |
317 return '\n'.join(commit_msg) | 323 return '\n'.join(commit_msg) |
318 | 324 |
319 | 325 |
320 def UpdateDepsFile(deps_filename, old_cr_revision, new_cr_revision, | 326 def UpdateDepsFile(deps_filename, old_cr_revision, new_cr_revision, |
321 changed_deps): | 327 changed_deps): |
322 """Update the DEPS file with the new revision.""" | 328 """Update the DEPS file with the new revision.""" |
323 | 329 |
324 # Update the chromium_revision variable. | 330 # Update the chromium_revision variable. |
325 with open(deps_filename, 'rb') as deps_file: | 331 with open(deps_filename, 'rb') as deps_file: |
326 deps_content = deps_file.read() | 332 deps_content = deps_file.read() |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 logging.info("No DEPS changes detected, skipping CL creation.") | 481 logging.info("No DEPS changes detected, skipping CL creation.") |
476 else: | 482 else: |
477 _LocalCommit(commit_msg, opts.dry_run) | 483 _LocalCommit(commit_msg, opts.dry_run) |
478 _UploadCL(opts.dry_run, opts.rietveld_email) | 484 _UploadCL(opts.dry_run, opts.rietveld_email) |
479 _SendToCQ(opts.dry_run, opts.skip_cq) | 485 _SendToCQ(opts.dry_run, opts.skip_cq) |
480 return 0 | 486 return 0 |
481 | 487 |
482 | 488 |
483 if __name__ == '__main__': | 489 if __name__ == '__main__': |
484 sys.exit(main()) | 490 sys.exit(main()) |
OLD | NEW |