diff options
author | Jian Cai <jiancai@google.com> | 2019-11-20 15:32:56 -0800 |
---|---|---|
committer | Jian Cai <jiancai@google.com> | 2019-11-24 19:10:42 +0000 |
commit | 121dbe56ddaba18ec5b15758ed669afd2e9acfd9 (patch) | |
tree | 401a4a18afc5a0a71d436200e6659fa79f09ce88 /llvm_tools/llvm_bisection.py | |
parent | 78c3463730b62fb048d1f76a58c9fbbab23f8efd (diff) | |
download | toolchain-utils-121dbe56ddaba18ec5b15758ed669afd2e9acfd9.tar.gz |
toolchain-utils: use LLVM git hashes to track version numbers.
LLVM has stopped issuing SVN version numbers in its commits. This patch
adds a way to track SVN-style version number based on a LLVM git hash.
BUG=Chromium:1027950
TEST=local tests.
Change-Id: Idd8055ea7deb3bcd17c18ab5b642ce8b389e446a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1915373
Tested-by: Jian Cai <jiancai@google.com>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Diffstat (limited to 'llvm_tools/llvm_bisection.py')
-rwxr-xr-x | llvm_tools/llvm_bisection.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm_tools/llvm_bisection.py b/llvm_tools/llvm_bisection.py index b45be0aa..4ff921d2 100755 --- a/llvm_tools/llvm_bisection.py +++ b/llvm_tools/llvm_bisection.py @@ -11,6 +11,7 @@ from __future__ import print_function import argparse import enum import errno +import get_llvm_hash import json import os import sys @@ -268,7 +269,7 @@ def GetRevisionsBetweenBisection(start, end, parallel, src_path, cur_revision not in skip_revisions: # Verify that the current revision exists by finding its corresponding # git hash in the LLVM source tree. - new_llvm.GetGitHashForVersion(src_path, cur_revision) + get_llvm_hash.GetGitHashFrom(src_path, cur_revision) valid_revisions.append(cur_revision) except ValueError: # Could not find the git hash for the current revision. @@ -302,9 +303,7 @@ def GetRevisionsListAndHashList(start, end, parallel, src_path, revisions = GetRevisionsBetweenBisection( start, end, parallel, src_path, pending_revisions, skip_revisions) - git_hashes = [ - new_llvm.GetGitHashForVersion(src_path, rev) for rev in revisions - ] + git_hashes = [get_llvm_hash.GetGitHashFrom(src_path, rev) for rev in revisions] return revisions, git_hashes @@ -363,7 +362,7 @@ def _NoteCompletedBisection(last_tested, src_path, end): print('Finished bisecting for %s' % last_tested) if src_path: - bad_llvm_hash = LLVMHash().GetGitHashForVersion(src_path, end) + bad_llvm_hash = get_llvm_hash.GetGitHashFrom(src_path, end) else: bad_llvm_hash = LLVMHash().GetLLVMHash(end) |