Auto roller: don't complain about expected dependencies.

It's ok for some WebRTC dependencies not to be Chromium dependencies.
Explicitly list them instead of relying of CIDP discrimination.

Bug: chromium:855108
Change-Id: I2dafce488b28409cbce7e0c3167d92f48859084f
Reviewed-on: https://webrtc-review.googlesource.com/101000
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24774}
This commit is contained in:
Yves Gerey
2018-09-19 13:52:04 +02:00
committed by Commit Bot
parent 401afd51bb
commit 1548e9a295
2 changed files with 34 additions and 9 deletions

View File

@ -32,6 +32,24 @@ DONT_AUTOROLL_THESE = [
'src/third_party/ffmpeg', 'src/third_party/ffmpeg',
] ]
# These dependencies are missing in chromium/src/DEPS, either unused or already
# in-tree. For instance, src/base is a part of the Chromium source git repo,
# but we pull it through a subtree mirror, so therefore it isn't listed in
# Chromium's deps but it is in ours.
WEBRTC_ONLY_DEPS = [
'src/base',
'src/build',
'src/ios'
'src/testing',
'src/third_party',
'src/third_party/findbugs',
'src/third_party/gtest-parallel',
'src/third_party/winsdk_samples',
'src/third_party/yasm/binaries',
'src/tools',
]
# Run these CQ trybots in addition to the default ones in infra/config/cq.cfg. # Run these CQ trybots in addition to the default ones in infra/config/cq.cfg.
EXTRA_TRYBOTS = ( EXTRA_TRYBOTS = (
'master.internal.tryserver.corp.webrtc:linux_internal' 'master.internal.tryserver.corp.webrtc:linux_internal'
@ -321,11 +339,10 @@ def FindRemovedDeps(webrtc_deps, new_cr_deps):
all_removed_deps = _FindNewDeps(new_cr_deps, webrtc_deps) all_removed_deps = _FindNewDeps(new_cr_deps, webrtc_deps)
generated_android_deps = [path for path in all_removed_deps generated_android_deps = [path for path in all_removed_deps
if path.startswith(ANDROID_DEPS_PATH)] if path.startswith(ANDROID_DEPS_PATH)]
# DepsEntry are assumed to be webrtc-only dependencies, # Webrtc-only dependencies are handled in CalculateChangedDeps.
# and are handled in CalculatedChangedDeds.
other_deps = [path for path in all_removed_deps other_deps = [path for path in all_removed_deps
if path not in generated_android_deps and if path not in generated_android_deps and
not isinstance(webrtc_deps['deps'][path], DepsEntry)] path not in WEBRTC_ONLY_DEPS]
return generated_android_deps, other_deps return generated_android_deps, other_deps
@ -365,7 +382,7 @@ def CalculateChangedDeps(webrtc_deps, new_cr_deps):
'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 path in WEBRTC_ONLY_DEPS:
# Use the HEAD of the deps repo. # Use the HEAD of the deps repo.
stdout, _ = _RunCommand(['git', 'ls-remote', webrtc_deps_entry.url, stdout, _ = _RunCommand(['git', 'ls-remote', webrtc_deps_entry.url,
'HEAD']) 'HEAD'])

View File

@ -258,10 +258,18 @@ class TestRollChromiumRevision(unittest.TestCase):
webrtc_deps = ParseLocalDepsFile(self._webrtc_depsfile) webrtc_deps = ParseLocalDepsFile(self._webrtc_depsfile)
new_cr_deps = ParseLocalDepsFile(self._new_cr_depsfile_android) new_cr_deps = ParseLocalDepsFile(self._new_cr_depsfile_android)
_, other_paths = FindRemovedDeps(webrtc_deps, new_cr_deps) _, other_paths = FindRemovedDeps(webrtc_deps, new_cr_deps)
self.assertEquals(other_paths, ['src/build', self.assertEquals(other_paths, ['src/third_party/xstream',
'src/third_party/xstream',
'src/buildtools']) 'src/buildtools'])
def testExpectedDepsIsNot(self):
"""Some deps musn't be seen as missing, even if absent from Chromium."""
webrtc_deps = ParseLocalDepsFile(self._webrtc_depsfile)
new_cr_deps = ParseLocalDepsFile(self._new_cr_depsfile_android)
removed_android_paths, other_paths = FindRemovedDeps(webrtc_deps,
new_cr_deps)
self.assertTrue('src/build' not in removed_android_paths)
self.assertTrue('src/build' not in other_paths)
def _CommitMessageSetup(self): def _CommitMessageSetup(self):
webrtc_deps = ParseLocalDepsFile(self._webrtc_depsfile_android) webrtc_deps = ParseLocalDepsFile(self._webrtc_depsfile_android)
new_cr_deps = ParseLocalDepsFile(self._new_cr_depsfile_android) new_cr_deps = ParseLocalDepsFile(self._new_cr_depsfile_android)