aboutsummaryrefslogtreecommitdiff
path: root/llvm_tools/llvm_patch_management.py
AgeCommit message (Collapse)Author
2020-04-17llvm_tools: move common functions into standalone modulesJian Cai
Move common functions into separate modules and update dependencies accordingly. BUG=chromium:1057428 TEST=local tests. Change-Id: I40f1b613f0a41f1fc478c811379c851479aff7c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2151708 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Jian Cai <jiancai@google.com>
2019-11-24toolchain-utils: use LLVM git hashes to track version numbers.Jian Cai
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>
2019-09-10llvm_tools: support grabbing google3's unstable LLVMGeorge Burgess IV
Google3 integrates LLVM pretty often -- using that as a foundation for testing might be a good idea. This CL enables us to pull the revision of their unstable LLVM. As an added bonus, this will also have us print a message to stderr when we're syncing LLVM for the first time. Otherwise, it may seem to a user that our script got hung up on something while that first clone happens. :) BUG=chromium:914081 TEST=Unittests. Ran the new get_llvm_hash functionality. Change-Id: I3a7088c25dbd7169ca31373daf0c46fb28f46a68 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1793906 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2019-09-09LLVM tools: Migrated all scripts to python3Salud Lemus
This CL includes changes such as replacements of `\'` with `"` and adding extra debugging output to some scripts. Currently, the scripts are in python2, so migrating them to python3 so they are more maintainable. BUG=None TEST=Ran each script by itself with various input (e.g. different google3, tot, etc.). Change-Id: Ib72b7744c6f7c13711c2db427f6524ff3cbc6205 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1787738 Tested-by: Salud Lemus <saludlemus@google.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
2019-08-26LLVM tools: Maintain up-to-date LLVM repo in 'llvm_tools'Salud Lemus
Keeps an up-to-date LLVM source tree in 'llvm_tools' directory. Previously, the LLVM repo would be cloned once and then be forgotten. BUG=None TEST=Ran the 'llvm_bisection.py' script on a previously created JSON file (the script created it before). Successfully created tryjobs that were not in the 'jobs' list. Also, successfully kept the LLVM repo up-to-date in 'llvm_tools'. Change-Id: If9038da788eb0fe0fe258274c1942f1d687868b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1769483 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Salud Lemus <saludlemus@google.com>
2019-08-22LLVM tools: Display to stdout when the log level is 'verbose'Salud Lemus
BUG=None TEST=Ran the 'update_chromeos_llvm_next_hash.py' with log level set to 'none' and then with 'verbose'. It correctly displayed to stdout for 'verbose'. Change-Id: Ib6b3bba44ccdb78a0d000f51287ffc7b0b5670d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1766581 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Salud Lemus <saludlemus@google.com>
2019-08-16LLVM tools: Moved function that retrieves latest g3 LLVM versionSalud Lemus
BUG=None TEST=Ran the script that creates tryjobs for both 'tot' and 'google3' Change-Id: I1be3971ab8858cb21d9d95b63b1bf60a98d3c7b9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1758728 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Salud Lemus <saludlemus@google.com>
2019-08-16LLVM tools: Added support for bisection of patchesSalud Lemus
Changed 'get_google3_llvm_version.py' and 'get_llvm_hash.py' to use the subprocess module instead of the command executer because the patch manager script uses some methods for bisection (retrieving the good and bad hash). They were also changed because the ebuilds will not have access to the command executer when invoking the patch manager script. BUG=None TEST=Ran the script on SVN version of 367622 without continuing bisection and successfully bisected the failed patch and terminated the script. Then moved HEAD of source tree to the bisected SVN version and applied the patch manually to test correctness and also moved HEAD to the SVN version one above it and one below it and also manually applied the patch. Change-Id: I2367b76e9bb4d0c95d651ec7b3f66e582155d2c7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1752526 Tested-by: Salud Lemus <saludlemus@google.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
2019-08-12LLVM tools: Assert that the scripts are not run inside the chrootSalud Lemus
BUG=None TEST=Scripts terminated when ran inside the chroot Change-Id: Id7060ca6554a05f158160e73759763663dec1ce9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1742544 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Salud Lemus <saludlemus@google.com>
2019-08-06LLVM tools: Added script that runs tryjobs after updating the packagesSalud Lemus
BUG=None TEST=Ran the script and a CL was generated for ToT correctly and two trybots were created, one for kevin and one for nocturne Change-Id: I856c23d4368f5e45d9837e6f4341ae1f97f8f136 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1733650 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org>
2019-08-01LLVM tools: patch management for LLVM and patch managerSalud Lemus
The script 'llvm_patch_management.py' constructs the arguments for the patch manager to handle patches of a package. The script 'patch_manager.py' is the patch manager. The patch manager has different modes to handle all applicable patches that fail to apply. The mode 'bisect_patches' is a WIP. BUG=None TEST=Created a json file that has the patches of the LLVM ebuild and used the default failure mode of the patch manager. All patches applied successfully for r365631. Change-Id: I42f339ac0bb7c35d70a96cc0c2daeb470336b13c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1708223 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Salud Lemus <saludlemus@google.com>