aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Beltran <ryanbeltran@chromium.org>2021-10-27 20:41:33 +0000
committerCommit Bot <commit-bot@chromium.org>2021-10-27 23:13:22 +0000
commit5200728bf0b8796194d079124a86dcde2f8fedf8 (patch)
tree9132520f9d871666bd3e4424a6ddfb4334552c5c
parentafd2d4b05fac5f3a71fd78e251f04cc54cb65c57 (diff)
downloadtoolchain-utils-5200728bf0b8796194d079124a86dcde2f8fedf8.tar.gz
llvm_tools: Add lldb_server to updated_packages
This CL adds dev-util/lldb-server to the list of packages updated by various tools. Additionally, it updates the default packages in update_chromeos_llvm_hash.py so that we don't have to manually supply them anymore, and refactors other scripts to use that list instead of maintaining their own. BUG=b:196602751 TEST=`python3 -m unittest discover -s . -p '*_unittest.py'` Change-Id: I0856c8f854dc2cbd0f2f21b71db96d3ef000caa8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3248929 Tested-by: Ryan Beltran <ryanbeltran@chromium.org> Auto-Submit: Ryan Beltran <ryanbeltran@chromium.org> Commit-Queue: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
-rw-r--r--llvm_tools/README.md1
-rwxr-xr-xllvm_tools/llvm_bisection.py9
-rwxr-xr-xllvm_tools/modify_a_tryjob.py9
-rwxr-xr-xllvm_tools/update_chromeos_llvm_hash.py10
-rwxr-xr-xllvm_tools/update_packages_and_run_tests.py12
5 files changed, 19 insertions, 22 deletions
diff --git a/llvm_tools/README.md b/llvm_tools/README.md
index 43c80ad6..74fad6c9 100644
--- a/llvm_tools/README.md
+++ b/llvm_tools/README.md
@@ -119,6 +119,7 @@ For example, to create a roll CL to the git hash of revision 367622:
$ ./update_chromeos_llvm_hash.py \
--update_packages sys-devel/llvm sys-libs/compiler-rt \
sys-libs/libcxx sys-libs/libcxxabi sys-libs/llvm-libunwind \
+ 'dev-util/lldb-server' \
--llvm_version 367622 \
--failure_mode disable_patches
```
diff --git a/llvm_tools/llvm_bisection.py b/llvm_tools/llvm_bisection.py
index b1898ea9..baaec703 100755
--- a/llvm_tools/llvm_bisection.py
+++ b/llvm_tools/llvm_bisection.py
@@ -20,9 +20,9 @@ import chroot
import get_llvm_hash
import git_llvm_rev
import modify_a_tryjob
+import update_chromeos_llvm_hash
import update_tryjob_status
-
class BisectionExitStatus(enum.Enum):
"""Exit code when performing bisection."""
@@ -295,10 +295,6 @@ def main(args_output):
"""
chroot.VerifyOutsideChroot()
- update_packages = [
- 'sys-devel/llvm', 'sys-libs/compiler-rt', 'sys-libs/libcxx',
- 'sys-libs/libcxxabi', 'sys-libs/llvm-libunwind'
- ]
patch_metadata_file = 'PATCHES.json'
start = args_output.start_rev
end = args_output.end_rev
@@ -378,7 +374,8 @@ def main(args_output):
raise ValueError(f'Revision {rev} exists already in "jobs"')
Bisect(revisions, git_hashes, bisect_state, args_output.last_tested,
- update_packages, args_output.chroot_path, patch_metadata_file,
+ update_chromeos_llvm_hash.DEFAULT_PACKAGES,
+ args_output.chroot_path, patch_metadata_file,
args_output.extra_change_lists, args_output.options,
args_output.builder, args_output.verbose)
diff --git a/llvm_tools/modify_a_tryjob.py b/llvm_tools/modify_a_tryjob.py
index 4d41e6b2..1bca30d4 100755
--- a/llvm_tools/modify_a_tryjob.py
+++ b/llvm_tools/modify_a_tryjob.py
@@ -17,9 +17,9 @@ import sys
import chroot
import failure_modes
import get_llvm_hash
+import update_chromeos_llvm_hash
import update_packages_and_run_tests
import update_tryjob_status
-import update_chromeos_llvm_hash
class ModifyTryjob(enum.Enum):
@@ -253,17 +253,14 @@ def PerformTryjobModification(revision, modify_tryjob, status_file, extra_cls,
# Make sure the revision is within the bounds of the start and end of the
# bisection.
elif bisect_contents['start'] < revision < bisect_contents['end']:
- update_packages = [
- 'sys-devel/llvm', 'sys-libs/compiler-rt', 'sys-libs/libcxx',
- 'sys-libs/libcxxabi', 'sys-libs/llvm-libunwind'
- ]
patch_metadata_file = 'PATCHES.json'
git_hash, revision = get_llvm_hash.GetLLVMHashAndVersionFromSVNOption(
revision)
- tryjob_dict = AddTryjob(update_packages, git_hash, revision, chroot_path,
+ tryjob_dict = AddTryjob(update_chromeos_llvm_hash.DEFAULT_PACKAGES,
+ git_hash, revision, chroot_path,
patch_metadata_file, extra_cls, options, builder,
verbose, revision)
diff --git a/llvm_tools/update_chromeos_llvm_hash.py b/llvm_tools/update_chromeos_llvm_hash.py
index ab83321a..9365f00b 100755
--- a/llvm_tools/update_chromeos_llvm_hash.py
+++ b/llvm_tools/update_chromeos_llvm_hash.py
@@ -25,6 +25,14 @@ import get_llvm_hash
import git
import llvm_patch_management
+DEFAULT_PACKAGES = [
+ 'dev-util/lldb-server',
+ 'sys-devel/llvm',
+ 'sys-libs/compiler-rt',
+ 'sys-libs/libcxx',
+ 'sys-libs/libcxxabi',
+ 'sys-libs/llvm-libunwind',
+]
# Specify which LLVM hash to update
class LLVMVariant(enum.Enum):
@@ -77,7 +85,7 @@ def GetCommandLineArgs():
# Add argument for specific builds to uprev and update their llvm-next hash.
parser.add_argument(
'--update_packages',
- default=['sys-devel/llvm'],
+ default=DEFAULT_PACKAGES,
required=False,
nargs='+',
help='the ebuilds to update their hash for llvm-next '
diff --git a/llvm_tools/update_packages_and_run_tests.py b/llvm_tools/update_packages_and_run_tests.py
index dd01253e..92f49307 100755
--- a/llvm_tools/update_packages_and_run_tests.py
+++ b/llvm_tools/update_packages_and_run_tests.py
@@ -21,7 +21,6 @@ import update_chromeos_llvm_hash
VALID_CQ_TRYBOTS = ['llvm', 'llvm-next', 'llvm-tot']
-
def GetCommandLineArgs():
"""Parses the command line for the command line arguments.
@@ -402,11 +401,6 @@ def main():
args_output = GetCommandLineArgs()
- update_packages = [
- 'sys-devel/llvm', 'sys-libs/compiler-rt', 'sys-libs/libcxx',
- 'sys-libs/libcxxabi', 'sys-libs/llvm-libunwind'
- ]
-
patch_metadata_file = 'PATCHES.json'
svn_option = args_output.llvm_version
@@ -420,8 +414,8 @@ def main():
# If --last_tested is specified, check if the current run has the same
# arguments last time --last_tested is used.
if args_output.last_tested:
- chroot_file_paths = chroot.GetChrootEbuildPaths(args_output.chroot_path,
- update_packages)
+ chroot_file_paths = chroot.GetChrootEbuildPaths(
+ args_output.chroot_path, update_chromeos_llvm_hash.DEFAULT_PACKAGES)
arg_dict = {
'svn_version': svn_version,
'ebuilds': chroot_file_paths,
@@ -449,7 +443,7 @@ def main():
extra_commit_msg += cq_trybot_msg
change_list = update_chromeos_llvm_hash.UpdatePackages(
- update_packages,
+ update_chromeos_llvm_hash.DEFAULT_PACKAGES,
llvm_variant,
git_hash,
svn_version,