Commit a784aab8 authored by Egor Pasko's avatar Egor Pasko Committed by Commit Bot

compare_orderfiles: reduce assert strength

Since October 2019 the name of the autoroller bot name changed, stop
checking for commit author name.

Bug: 1066739
Change-Id: I192896ac3a2b4081352cccf148d5d6492ad45710
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134302
Auto-Submit: Egor Pasko <pasko@chromium.org>
Commit-Queue: Benoit L <lizeb@chromium.org>
Reviewed-by: default avatarBenoit L <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756305}
parent 2e24affa
......@@ -121,12 +121,13 @@ def CheckOrderfileCommit(commit_hash, clank_path):
commit_hash: (str) Git hash of the orderfile roll commit.
clank_path: (str) Path to the clank repository.
"""
output = subprocess.check_output(
['git', 'show', r'--format=%an %s', commit_hash], cwd=clank_path)
output = subprocess.check_output(['git', 'show', r'--format=%s', commit_hash],
cwd=clank_path)
first_line = output.split('\n')[0]
# Capitalization changed at some point.
assert first_line.upper() == 'clank-autoroller Update Orderfile.'.upper(), (
'Not an orderfile commit')
# Capitalization changed at some point. Not checking the bot name because it
# changed too.
assert first_line.upper().endswith(
'Update Orderfile.'.upper()), ('Not an orderfile commit')
def GetBeforeAfterOrderfileHashes(commit_hash, clank_path):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment