aboutsummaryrefslogtreecommitdiff
path: root/llvm_tools/update_packages_and_run_tests.py
diff options
context:
space:
mode:
authorRyan Beltran <ryanbeltran@chromium.org>2021-10-27 20:47:16 +0000
committerCommit Bot <commit-bot@chromium.org>2021-10-27 23:13:23 +0000
commitd080198a6e20a85e3d6c57a9fb168d4e19b3503c (patch)
tree35207dea5153da762d42d34a1cf45b93e4a6ff77 /llvm_tools/update_packages_and_run_tests.py
parent5200728bf0b8796194d079124a86dcde2f8fedf8 (diff)
downloadtoolchain-utils-d080198a6e20a85e3d6c57a9fb168d4e19b3503c.tar.gz
llvm_tools: fix yapf warnings
This CL applies fixes automatically generated by yapf during presubmit hook as well as a few manual fixes: * Removing erroneous `verbose` argument from call to RunTryJobs * Replacing / with parenthsis for long lines * Shortened some variable names to fix lines that were too long BUG=None TEST=rerean unit tests Change-Id: Ic6ed4bb74f067dd5c67991481caf75d8829bf86e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3248930 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>
Diffstat (limited to 'llvm_tools/update_packages_and_run_tests.py')
-rwxr-xr-xllvm_tools/update_packages_and_run_tests.py90
1 files changed, 42 insertions, 48 deletions
diff --git a/llvm_tools/update_packages_and_run_tests.py b/llvm_tools/update_packages_and_run_tests.py
index 92f49307..2e4a9058 100755
--- a/llvm_tools/update_packages_and_run_tests.py
+++ b/llvm_tools/update_packages_and_run_tests.py
@@ -21,6 +21,7 @@ import update_chromeos_llvm_hash
VALID_CQ_TRYBOTS = ['llvm', 'llvm-next', 'llvm-tot']
+
def GetCommandLineArgs():
"""Parses the command line for the command line arguments.
@@ -50,10 +51,9 @@ def GetCommandLineArgs():
'of updating the packages')
# Add argument for a specific chroot path.
- parser.add_argument(
- '--chroot_path',
- default=cros_root,
- help='the path to the chroot (default: %(default)s)')
+ parser.add_argument('--chroot_path',
+ default=cros_root,
+ help='the path to the chroot (default: %(default)s)')
# Add argument to choose between llvm and llvm-next.
parser.add_argument(
@@ -70,65 +70,58 @@ def GetCommandLineArgs():
'arguments.')
# Add argument for the LLVM version to use.
- parser.add_argument(
- '--llvm_version',
- type=get_llvm_hash.IsSvnOption,
- required=True,
- help='which git hash of LLVM to find '
- '{google3, ToT, <svn_version>} '
- '(default: finds the git hash of the google3 LLVM '
- 'version)')
+ parser.add_argument('--llvm_version',
+ type=get_llvm_hash.IsSvnOption,
+ required=True,
+ help='which git hash of LLVM to find '
+ '{google3, ToT, <svn_version>} '
+ '(default: finds the git hash of the google3 LLVM '
+ 'version)')
# Add argument to add reviewers for the created CL.
- parser.add_argument(
- '--reviewers',
- nargs='+',
- default=[],
- help='The reviewers for the package update changelist')
+ parser.add_argument('--reviewers',
+ nargs='+',
+ default=[],
+ help='The reviewers for the package update changelist')
# Add argument for whether to display command contents to `stdout`.
- parser.add_argument(
- '--verbose',
- action='store_true',
- help='display contents of a command to the terminal '
- '(default: %(default)s)')
+ parser.add_argument('--verbose',
+ action='store_true',
+ help='display contents of a command to the terminal '
+ '(default: %(default)s)')
subparsers = parser.add_subparsers(dest='subparser_name')
subparser_names = []
# Testing with the tryjobs.
tryjob_subparser = subparsers.add_parser('tryjobs')
subparser_names.append('tryjobs')
- tryjob_subparser.add_argument(
- '--builders',
- required=True,
- nargs='+',
- default=[],
- help='builders to use for the tryjob testing')
+ tryjob_subparser.add_argument('--builders',
+ required=True,
+ nargs='+',
+ default=[],
+ help='builders to use for the tryjob testing')
# Add argument for custom options for the tryjob.
- tryjob_subparser.add_argument(
- '--options',
- required=False,
- nargs='+',
- default=[],
- help='options to use for the tryjob testing')
+ tryjob_subparser.add_argument('--options',
+ required=False,
+ nargs='+',
+ default=[],
+ help='options to use for the tryjob testing')
# Testing with the recipe builders
recipe_subparser = subparsers.add_parser('recipe')
subparser_names.append('recipe')
- recipe_subparser.add_argument(
- '--options',
- required=False,
- nargs='+',
- default=[],
- help='options passed to the recipe builders')
-
- recipe_subparser.add_argument(
- '--builders',
- required=True,
- nargs='+',
- default=[],
- help='recipe builders to launch')
+ recipe_subparser.add_argument('--options',
+ required=False,
+ nargs='+',
+ default=[],
+ help='options passed to the recipe builders')
+
+ recipe_subparser.add_argument('--builders',
+ required=True,
+ nargs='+',
+ default=[],
+ help='recipe builders to launch')
# Testing with CQ.
cq_subparser = subparsers.add_parser('cq')
@@ -359,7 +352,8 @@ def GetCQDependString(dependent_cls):
return None
# Cq-Depend must start a new paragraph prefixed with "Cq-Depend".
- return '\nCq-Depend: ' + ', '.join(('chromium:%s' % i) for i in dependent_cls)
+ return '\nCq-Depend: ' + ', '.join(
+ ('chromium:%s' % i) for i in dependent_cls)
def GetCQIncludeTrybotsString(trybot):