Add google-truth to WEBRTC_ONLY_DEPS to unblock Chromium roll.
https://ci.chromium.org/ui/p/webrtc/builders/cron/Auto-roll%20-%20WebRTC%20DEPS/25338/overview Change-Id: Ifc0a13b080843f5acde9188312bee9504811aadc Bug: None Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323901 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Jeremy Leconte <jleconte@google.com> Cr-Commit-Position: refs/heads/main@{#40954}
This commit is contained in:
parent
1d835705c9
commit
908c21c954
@ -49,6 +49,7 @@ CPPLINT_EXCEPTIONS = [
|
||||
|
||||
PYLINT_OLD_STYLE = [
|
||||
"PRESUBMIT.py",
|
||||
"tools_webrtc/autoroller/roll_deps.py",
|
||||
]
|
||||
|
||||
# These filters will always be removed, even if the caller specifies a filter
|
||||
|
||||
@ -49,6 +49,8 @@ WEBRTC_ONLY_DEPS = [
|
||||
'src/testing',
|
||||
'src/third_party',
|
||||
'src/third_party/clang_format/script',
|
||||
# TODO(jleconte): Remove once Chromium is rolled in WebRTC.
|
||||
'src/third_party/google-truth',
|
||||
'src/third_party/gtest-parallel',
|
||||
'src/third_party/pipewire/linux-amd64',
|
||||
'src/tools',
|
||||
@ -171,7 +173,8 @@ def _RunCommand(command,
|
||||
if not ignore_exit_code and p.returncode != 0:
|
||||
logging.error('Command failed: %s\n'
|
||||
'stdout:\n%s\n'
|
||||
'stderr:\n%s\n', ' '.join(command), std_output, err_output)
|
||||
'stderr:\n%s\n', ' '.join(command), std_output,
|
||||
err_output)
|
||||
sys.exit(p.returncode)
|
||||
return std_output, err_output
|
||||
|
||||
@ -259,7 +262,8 @@ def GetMatchingDepsEntries(depsentry_dict, dir_path):
|
||||
result.append(depsentry)
|
||||
else:
|
||||
parts = path.split('/')
|
||||
if all(part == parts[i] for i, part in enumerate(dir_path.split('/'))):
|
||||
if all(part == parts[i]
|
||||
for i, part in enumerate(dir_path.split('/'))):
|
||||
result.append(depsentry)
|
||||
return result
|
||||
|
||||
@ -396,8 +400,9 @@ def FindRemovedDeps(webrtc_deps, new_cr_deps):
|
||||
A list of paths of unexpected disappearing dependencies.
|
||||
"""
|
||||
all_removed_deps = _FindNewDeps(new_cr_deps, webrtc_deps)
|
||||
generated_android_deps = sorted(
|
||||
[path for path in all_removed_deps if path.startswith(ANDROID_DEPS_PATH)])
|
||||
generated_android_deps = sorted([
|
||||
path for path in all_removed_deps if path.startswith(ANDROID_DEPS_PATH)
|
||||
])
|
||||
# Webrtc-only dependencies are handled in CalculateChangedDeps.
|
||||
other_deps = sorted([
|
||||
path for path in all_removed_deps
|
||||
@ -446,8 +451,8 @@ def CalculateChangedDeps(webrtc_deps, new_cr_deps):
|
||||
# Use the revision from Chromium's DEPS file.
|
||||
new_rev = cr_deps_entry.revision
|
||||
assert webrtc_deps_entry.url == cr_deps_entry.url, (
|
||||
'WebRTC DEPS entry %s has a different URL %s than Chromium %s.' %
|
||||
(path, webrtc_deps_entry.url, cr_deps_entry.url))
|
||||
'WebRTC DEPS entry %s has a different URL %s than Chromium %s.'
|
||||
% (path, webrtc_deps_entry.url, cr_deps_entry.url))
|
||||
else:
|
||||
if isinstance(webrtc_deps_entry, DepsEntry):
|
||||
# Use the HEAD of the deps repo.
|
||||
@ -463,8 +468,8 @@ def CalculateChangedDeps(webrtc_deps, new_cr_deps):
|
||||
if webrtc_deps_entry.revision != new_rev:
|
||||
logging.debug('Roll dependency %s to %s', path, new_rev)
|
||||
result.append(
|
||||
ChangedDep(path, webrtc_deps_entry.url, webrtc_deps_entry.revision,
|
||||
new_rev))
|
||||
ChangedDep(path, webrtc_deps_entry.url,
|
||||
webrtc_deps_entry.revision, new_rev))
|
||||
return sorted(result)
|
||||
|
||||
|
||||
@ -484,7 +489,8 @@ def CalculateChangedClang(new_cr_rev):
|
||||
new_clang_update_py = ReadRemoteCrFile(CLANG_UPDATE_SCRIPT_URL_PATH,
|
||||
new_cr_rev).splitlines()
|
||||
new_rev = GetClangRev(new_clang_update_py)
|
||||
return ChangedDep(CLANG_UPDATE_SCRIPT_LOCAL_PATH, None, current_rev, new_rev)
|
||||
return ChangedDep(CLANG_UPDATE_SCRIPT_LOCAL_PATH, None, current_rev,
|
||||
new_rev)
|
||||
|
||||
|
||||
def GenerateCommitMessage(
|
||||
@ -502,7 +508,8 @@ def GenerateCommitMessage(
|
||||
git_number_interval = '%s:%s' % (current_commit_pos, new_commit_pos)
|
||||
|
||||
commit_msg = [
|
||||
'Roll chromium_revision %s (%s)\n' % (rev_interval, git_number_interval),
|
||||
'Roll chromium_revision %s (%s)\n' %
|
||||
(rev_interval, git_number_interval),
|
||||
'Change log: %s' % (CHROMIUM_LOG_TEMPLATE % rev_interval),
|
||||
'Full diff: %s\n' % (CHROMIUM_COMMIT_TEMPLATE % rev_interval)
|
||||
]
|
||||
@ -522,7 +529,8 @@ def GenerateCommitMessage(
|
||||
commit_msg.append('* %s_version: %s..%s' %
|
||||
(c.path, c.current_version, c.new_version))
|
||||
else:
|
||||
commit_msg.append('* %s: %s/+log/%s..%s' %
|
||||
commit_msg.append(
|
||||
'* %s: %s/+log/%s..%s' %
|
||||
(c.path, c.url, c.current_rev[0:10], c.new_rev[0:10]))
|
||||
|
||||
if added_deps_paths:
|
||||
@ -565,7 +573,8 @@ def UpdateDepsFile(deps_filename, rev_update, changed_deps, new_cr_content):
|
||||
# Add and remove dependencies. For now: only generated android deps.
|
||||
# Since gclient cannot add or remove deps, we on the fact that
|
||||
# these android deps are located in one place we can copy/paste.
|
||||
deps_re = re.compile(ANDROID_DEPS_START + '.*' + ANDROID_DEPS_END, re.DOTALL)
|
||||
deps_re = re.compile(ANDROID_DEPS_START + '.*' + ANDROID_DEPS_END,
|
||||
re.DOTALL)
|
||||
new_deps = deps_re.search(new_cr_content)
|
||||
old_deps = deps_re.search(deps_content)
|
||||
if not new_deps or not old_deps:
|
||||
@ -577,7 +586,8 @@ def UpdateDepsFile(deps_filename, rev_update, changed_deps, new_cr_content):
|
||||
|
||||
for dep in changed_deps:
|
||||
if isinstance(dep, ChangedVersionEntry):
|
||||
deps_content = deps_content.replace(dep.current_version, dep.new_version)
|
||||
deps_content = deps_content.replace(dep.current_version,
|
||||
dep.new_version)
|
||||
|
||||
with open(deps_filename, 'wb') as deps_file:
|
||||
deps_file.write(deps_content.encode('utf-8'))
|
||||
@ -618,7 +628,8 @@ def _EnsureUpdatedMainBranch(dry_run):
|
||||
current_branch = _RunCommand(['git', 'rev-parse', '--abbrev-ref',
|
||||
'HEAD'])[0].splitlines()[0]
|
||||
if current_branch != 'main':
|
||||
logging.error('Please checkout the main branch and re-run this script.')
|
||||
logging.error(
|
||||
'Please checkout the main branch and re-run this script.')
|
||||
if not dry_run:
|
||||
sys.exit(-1)
|
||||
|
||||
@ -722,20 +733,23 @@ def main():
|
||||
'--revision',
|
||||
help=('Chromium Git revision to roll to. Defaults to the '
|
||||
'Chromium HEAD revision if omitted.'))
|
||||
p.add_argument('--dry-run',
|
||||
p.add_argument(
|
||||
'--dry-run',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help=('Calculate changes and modify DEPS, but don\'t create '
|
||||
'any local branch, commit, upload CL or send any '
|
||||
'tryjobs.'))
|
||||
p.add_argument('-i',
|
||||
p.add_argument(
|
||||
'-i',
|
||||
'--ignore-unclean-workdir',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help=('Ignore if the current branch is not main or if there '
|
||||
'are uncommitted changes (default: %(default)s).'))
|
||||
grp = p.add_mutually_exclusive_group()
|
||||
grp.add_argument('--skip-cq',
|
||||
grp.add_argument(
|
||||
'--skip-cq',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='Skip sending the CL to the CQ (default: %(default)s)')
|
||||
@ -786,7 +800,8 @@ def main():
|
||||
if other_deps:
|
||||
raise RollError('WebRTC DEPS entries are missing from Chromium: %s.\n'
|
||||
'Remove them or add them to either '
|
||||
'WEBRTC_ONLY_DEPS or DONT_AUTOROLL_THESE.' % other_deps)
|
||||
'WEBRTC_ONLY_DEPS or DONT_AUTOROLL_THESE.' %
|
||||
other_deps)
|
||||
clang_change = CalculateChangedClang(rev_update.new_chromium_rev)
|
||||
commit_msg = GenerateCommitMessage(
|
||||
rev_update,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user