Force autoroller to fail if any dep is missing
Force auto roll of chromium third_party into WebRTC to fail if any one of required chromium-specific dependencies is missing in chromium third_party repo of after checking it into WebRTC repo. Also try to fix some flakes in autoroller. Bug: webrtc:8366 Change-Id: I781cd4d4a4a230fb126cc32d8147310f70ab8b91 Reviewed-on: https://webrtc-review.googlesource.com/77722 Commit-Queue: Artem Titov <titovartem@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23340}
This commit is contained in:
parent
401d07690b
commit
97cb90a440
@ -434,11 +434,26 @@ def UpdateThirdPartyDeps(new_rev, dest_dir, source_dir,
|
||||
|
||||
deps_to_checkout = _LoadThirdPartyDepsAndFiles(third_party_deps_file)
|
||||
# Update existing chromium third_party checkout to new rev.
|
||||
_RunCommand(['git', 'fetch', 'origin', new_rev], working_dir=source_dir)
|
||||
_RunCommand(['git', 'fetch', 'origin'], working_dir=source_dir)
|
||||
_RunCommand(['git', 'checkout', new_rev], working_dir=source_dir)
|
||||
# Checkout chromium repo into dest dir basing on source checkout.
|
||||
_RunCommand(
|
||||
['git', '--git-dir', '%s/.git' % source_dir, 'checkout',
|
||||
new_rev] + deps_to_checkout, working_dir=dest_dir)
|
||||
# Ensure all chromium dependencies are presented
|
||||
deps_set = set(deps_to_checkout)
|
||||
stdout, _ = _RunCommand(['git', 'ls-tree', '--name-only', 'HEAD'],
|
||||
working_dir=source_dir)
|
||||
if not deps_set.issubset(set(stdout.split('\n'))):
|
||||
raise RollError('Missed required chromium dependencies in chromium '
|
||||
'third_party repo: %s' % json.dumps(
|
||||
list(deps_set.difference(set(stdout.split('\n'))))))
|
||||
stdout, _ = _RunCommand(['git', 'ls-tree', '--name-only', 'HEAD'],
|
||||
working_dir=dest_dir)
|
||||
if not deps_set.issubset(set(stdout.split('\n'))):
|
||||
raise RollError('Missed required chromium dependencies after checking in '
|
||||
'chromium third_party repo: %s' % json.dumps(
|
||||
list(deps_set.difference(set(stdout.split('\n'))))))
|
||||
|
||||
|
||||
def _IsTreeClean():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user