diff options
author | Ryan Beltran <ryanbeltran@chromium.org> | 2024-03-14 21:15:30 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2024-03-20 21:13:17 +0000 |
commit | a692f08cecb43c1027e9277c7a8408a9a68f0aa8 (patch) | |
tree | 84a73a2a2e72d1fa4c1eda972e6e7daf142a15b4 | |
parent | b8a26ea2988fee3391119fc198a87594cda8f6fc (diff) | |
download | toolchain-utils-a692f08cecb43c1027e9277c7a8408a9a68f0aa8.tar.gz |
llvm_tools: update repo manifest by default for llvm upgrades
We need to make manifest changes to apply llvm upgrades now. The
update_chromeos_llvm_hash script already supports this but by putting it
behind a flag it is easy to miss (especially since it wasn't necessary
until relatively recently). This CL makes it automatic for non-llvm_next
updates.
BUG=None
TEST=llvm_tools/update_chromeos_llvm_hash_unittest.py
Change-Id: I78ea436ea7e1f52bac00ede55b46705ae13dd03e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/5373412
Reviewed-by: George Burgess <gbiv@chromium.org>
Commit-Queue: Ryan Beltran <ryanbeltran@chromium.org>
Tested-by: Ryan Beltran <ryanbeltran@chromium.org>
-rwxr-xr-x | llvm_tools/update_chromeos_llvm_hash.py | 9 | ||||
-rwxr-xr-x | llvm_tools/update_chromeos_llvm_hash_unittest.py | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/llvm_tools/update_chromeos_llvm_hash.py b/llvm_tools/update_chromeos_llvm_hash.py index 510bfa9c..7e6b89c2 100755 --- a/llvm_tools/update_chromeos_llvm_hash.py +++ b/llvm_tools/update_chromeos_llvm_hash.py @@ -237,9 +237,10 @@ def GetCommandLineArgs(): "metadata if applicable (default: PATCHES.json inside $FILESDIR)", ) parser.add_argument( - "--repo_manifest", - action="store_true", - help="Updates the llvm-project revision attribute" + "--no_repo_manifest", + dest="repo_manifest", + action="store_false", + help="Skip updating the llvm-project revision attribute" " in the internal manifest.", ) parser.add_argument( @@ -896,7 +897,7 @@ def main(): else: print("--no-upload passed, did not create a change list") - if args_output.repo_manifest: + if args_output.repo_manifest and not args_output.is_llvm_next: print( f"Updating internal manifest to {git_hash} ({svn_version})...", end="", diff --git a/llvm_tools/update_chromeos_llvm_hash_unittest.py b/llvm_tools/update_chromeos_llvm_hash_unittest.py index 7f9bbbe4..dcf6944e 100755 --- a/llvm_tools/update_chromeos_llvm_hash_unittest.py +++ b/llvm_tools/update_chromeos_llvm_hash_unittest.py @@ -726,6 +726,7 @@ class UpdateLLVMHashTest(unittest.TestCase): mock_gethash.return_value = (git_hash, svn_version) argv = [ "./update_chromeos_llvm_hash_unittest.py", + "--no_repo_manifest", "--llvm_version", "google3", ] @@ -834,6 +835,7 @@ class UpdateLLVMHashTest(unittest.TestCase): failure_mode.value, "--patch_metadata_file", "META.json", + "--no_repo_manifest", ] with mock.patch.object(sys, "argv", argv) as mock.argv: |