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 = [
|
PYLINT_OLD_STYLE = [
|
||||||
"PRESUBMIT.py",
|
"PRESUBMIT.py",
|
||||||
|
"tools_webrtc/autoroller/roll_deps.py",
|
||||||
]
|
]
|
||||||
|
|
||||||
# These filters will always be removed, even if the caller specifies a filter
|
# These filters will always be removed, even if the caller specifies a filter
|
||||||
|
|||||||
@ -49,6 +49,8 @@ WEBRTC_ONLY_DEPS = [
|
|||||||
'src/testing',
|
'src/testing',
|
||||||
'src/third_party',
|
'src/third_party',
|
||||||
'src/third_party/clang_format/script',
|
'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/gtest-parallel',
|
||||||
'src/third_party/pipewire/linux-amd64',
|
'src/third_party/pipewire/linux-amd64',
|
||||||
'src/tools',
|
'src/tools',
|
||||||
@ -171,7 +173,8 @@ def _RunCommand(command,
|
|||||||
if not ignore_exit_code and p.returncode != 0:
|
if not ignore_exit_code and p.returncode != 0:
|
||||||
logging.error('Command failed: %s\n'
|
logging.error('Command failed: %s\n'
|
||||||
'stdout:\n%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)
|
sys.exit(p.returncode)
|
||||||
return std_output, err_output
|
return std_output, err_output
|
||||||
|
|
||||||
@ -259,7 +262,8 @@ def GetMatchingDepsEntries(depsentry_dict, dir_path):
|
|||||||
result.append(depsentry)
|
result.append(depsentry)
|
||||||
else:
|
else:
|
||||||
parts = path.split('/')
|
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)
|
result.append(depsentry)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
@ -396,8 +400,9 @@ def FindRemovedDeps(webrtc_deps, new_cr_deps):
|
|||||||
A list of paths of unexpected disappearing dependencies.
|
A list of paths of unexpected disappearing dependencies.
|
||||||
"""
|
"""
|
||||||
all_removed_deps = _FindNewDeps(new_cr_deps, webrtc_deps)
|
all_removed_deps = _FindNewDeps(new_cr_deps, webrtc_deps)
|
||||||
generated_android_deps = sorted(
|
generated_android_deps = sorted([
|
||||||
[path for path in all_removed_deps if path.startswith(ANDROID_DEPS_PATH)])
|
path for path in all_removed_deps if path.startswith(ANDROID_DEPS_PATH)
|
||||||
|
])
|
||||||
# Webrtc-only dependencies are handled in CalculateChangedDeps.
|
# Webrtc-only dependencies are handled in CalculateChangedDeps.
|
||||||
other_deps = sorted([
|
other_deps = sorted([
|
||||||
path for path in all_removed_deps
|
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.
|
# Use the revision from Chromium's DEPS file.
|
||||||
new_rev = cr_deps_entry.revision
|
new_rev = cr_deps_entry.revision
|
||||||
assert webrtc_deps_entry.url == cr_deps_entry.url, (
|
assert webrtc_deps_entry.url == cr_deps_entry.url, (
|
||||||
'WebRTC DEPS entry %s has a different URL %s than Chromium %s.' %
|
'WebRTC DEPS entry %s has a different URL %s than Chromium %s.'
|
||||||
(path, webrtc_deps_entry.url, cr_deps_entry.url))
|
% (path, webrtc_deps_entry.url, cr_deps_entry.url))
|
||||||
else:
|
else:
|
||||||
if isinstance(webrtc_deps_entry, DepsEntry):
|
if isinstance(webrtc_deps_entry, DepsEntry):
|
||||||
# Use the HEAD of the deps repo.
|
# 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:
|
if webrtc_deps_entry.revision != new_rev:
|
||||||
logging.debug('Roll dependency %s to %s', path, new_rev)
|
logging.debug('Roll dependency %s to %s', path, new_rev)
|
||||||
result.append(
|
result.append(
|
||||||
ChangedDep(path, webrtc_deps_entry.url, webrtc_deps_entry.revision,
|
ChangedDep(path, webrtc_deps_entry.url,
|
||||||
new_rev))
|
webrtc_deps_entry.revision, new_rev))
|
||||||
return sorted(result)
|
return sorted(result)
|
||||||
|
|
||||||
|
|
||||||
@ -484,7 +489,8 @@ def CalculateChangedClang(new_cr_rev):
|
|||||||
new_clang_update_py = ReadRemoteCrFile(CLANG_UPDATE_SCRIPT_URL_PATH,
|
new_clang_update_py = ReadRemoteCrFile(CLANG_UPDATE_SCRIPT_URL_PATH,
|
||||||
new_cr_rev).splitlines()
|
new_cr_rev).splitlines()
|
||||||
new_rev = GetClangRev(new_clang_update_py)
|
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(
|
def GenerateCommitMessage(
|
||||||
@ -502,7 +508,8 @@ def GenerateCommitMessage(
|
|||||||
git_number_interval = '%s:%s' % (current_commit_pos, new_commit_pos)
|
git_number_interval = '%s:%s' % (current_commit_pos, new_commit_pos)
|
||||||
|
|
||||||
commit_msg = [
|
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),
|
'Change log: %s' % (CHROMIUM_LOG_TEMPLATE % rev_interval),
|
||||||
'Full diff: %s\n' % (CHROMIUM_COMMIT_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' %
|
commit_msg.append('* %s_version: %s..%s' %
|
||||||
(c.path, c.current_version, c.new_version))
|
(c.path, c.current_version, c.new_version))
|
||||||
else:
|
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]))
|
(c.path, c.url, c.current_rev[0:10], c.new_rev[0:10]))
|
||||||
|
|
||||||
if added_deps_paths:
|
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.
|
# Add and remove dependencies. For now: only generated android deps.
|
||||||
# Since gclient cannot add or remove deps, we on the fact that
|
# Since gclient cannot add or remove deps, we on the fact that
|
||||||
# these android deps are located in one place we can copy/paste.
|
# 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)
|
new_deps = deps_re.search(new_cr_content)
|
||||||
old_deps = deps_re.search(deps_content)
|
old_deps = deps_re.search(deps_content)
|
||||||
if not new_deps or not old_deps:
|
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:
|
for dep in changed_deps:
|
||||||
if isinstance(dep, ChangedVersionEntry):
|
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:
|
with open(deps_filename, 'wb') as deps_file:
|
||||||
deps_file.write(deps_content.encode('utf-8'))
|
deps_file.write(deps_content.encode('utf-8'))
|
||||||
@ -618,7 +628,8 @@ def _EnsureUpdatedMainBranch(dry_run):
|
|||||||
current_branch = _RunCommand(['git', 'rev-parse', '--abbrev-ref',
|
current_branch = _RunCommand(['git', 'rev-parse', '--abbrev-ref',
|
||||||
'HEAD'])[0].splitlines()[0]
|
'HEAD'])[0].splitlines()[0]
|
||||||
if current_branch != 'main':
|
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:
|
if not dry_run:
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
@ -722,20 +733,23 @@ def main():
|
|||||||
'--revision',
|
'--revision',
|
||||||
help=('Chromium Git revision to roll to. Defaults to the '
|
help=('Chromium Git revision to roll to. Defaults to the '
|
||||||
'Chromium HEAD revision if omitted.'))
|
'Chromium HEAD revision if omitted.'))
|
||||||
p.add_argument('--dry-run',
|
p.add_argument(
|
||||||
|
'--dry-run',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=False,
|
default=False,
|
||||||
help=('Calculate changes and modify DEPS, but don\'t create '
|
help=('Calculate changes and modify DEPS, but don\'t create '
|
||||||
'any local branch, commit, upload CL or send any '
|
'any local branch, commit, upload CL or send any '
|
||||||
'tryjobs.'))
|
'tryjobs.'))
|
||||||
p.add_argument('-i',
|
p.add_argument(
|
||||||
|
'-i',
|
||||||
'--ignore-unclean-workdir',
|
'--ignore-unclean-workdir',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=False,
|
default=False,
|
||||||
help=('Ignore if the current branch is not main or if there '
|
help=('Ignore if the current branch is not main or if there '
|
||||||
'are uncommitted changes (default: %(default)s).'))
|
'are uncommitted changes (default: %(default)s).'))
|
||||||
grp = p.add_mutually_exclusive_group()
|
grp = p.add_mutually_exclusive_group()
|
||||||
grp.add_argument('--skip-cq',
|
grp.add_argument(
|
||||||
|
'--skip-cq',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=False,
|
default=False,
|
||||||
help='Skip sending the CL to the CQ (default: %(default)s)')
|
help='Skip sending the CL to the CQ (default: %(default)s)')
|
||||||
@ -786,7 +800,8 @@ def main():
|
|||||||
if other_deps:
|
if other_deps:
|
||||||
raise RollError('WebRTC DEPS entries are missing from Chromium: %s.\n'
|
raise RollError('WebRTC DEPS entries are missing from Chromium: %s.\n'
|
||||||
'Remove them or add them to either '
|
'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)
|
clang_change = CalculateChangedClang(rev_update.new_chromium_rev)
|
||||||
commit_msg = GenerateCommitMessage(
|
commit_msg = GenerateCommitMessage(
|
||||||
rev_update,
|
rev_update,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user