Commit df195fd5 authored by Ben Pastene's avatar Ben Pastene Committed by Commit Bot

Add a yapf style to //build/chromeos/ and auto-format all python files.

Format all the things!

Change-Id: I33f02e6e21c4388f381b35e06394fb916bfddddd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1891735
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711845}
parent 1a685434
[style]
based_on_style = chromium
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
"""Presubmit script for build/chromeos/. """Presubmit script for build/chromeos/.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
...@@ -11,9 +10,7 @@ details on the presubmit API built into depot_tools. ...@@ -11,9 +10,7 @@ details on the presubmit API built into depot_tools.
def CommonChecks(input_api, output_api): def CommonChecks(input_api, output_api):
return input_api.canned_checks.RunPylint( return input_api.canned_checks.RunPylint(
input_api, input_api, output_api, pylintrc='pylintrc')
output_api,
pylintrc='pylintrc')
def CheckChangeOnUpload(input_api, output_api): def CheckChangeOnUpload(input_api, output_api):
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# Copyright 2018 The Chromium Authors. All rights reserved. # Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
"""Creates a script that runs a CrOS VM test by delegating to """Creates a script that runs a CrOS VM test by delegating to
build/chromeos/test_runner.py. build/chromeos/test_runner.py.
""" """
...@@ -12,7 +11,6 @@ import argparse ...@@ -12,7 +11,6 @@ import argparse
import os import os
import sys import sys
SCRIPT_TEMPLATE = """\ SCRIPT_TEMPLATE = """\
#!/usr/bin/env python #!/usr/bin/env python
# #
...@@ -90,7 +88,8 @@ def main(args): ...@@ -90,7 +88,8 @@ def main(args):
vm_test_args.append('--deploy-chrome') vm_test_args.append('--deploy-chrome')
vm_test_args += [ vm_test_args += [
'--board', args.board, '--board',
args.board,
'-v', '-v',
] ]
if args.use_vm: if args.use_vm:
...@@ -100,17 +99,18 @@ def main(args): ...@@ -100,17 +99,18 @@ def main(args):
('--cros-cache', RelativizePathToScript(args.cros_cache)), ('--cros-cache', RelativizePathToScript(args.cros_cache)),
] ]
if args.runtime_deps_path: if args.runtime_deps_path:
vm_test_path_args.append( vm_test_path_args.append(('--runtime-deps-path',
('--runtime-deps-path', RelativizePathToScript(args.runtime_deps_path))) RelativizePathToScript(args.runtime_deps_path)))
if args.output_directory: if args.output_directory:
vm_test_path_args.append( vm_test_path_args.append(('--path-to-outdir',
('--path-to-outdir', RelativizePathToScript(args.output_directory))) RelativizePathToScript(args.output_directory)))
with open(args.script_output_path, 'w') as script: with open(args.script_output_path, 'w') as script:
script.write(SCRIPT_TEMPLATE.format( script.write(
vm_test_script=run_test_path, SCRIPT_TEMPLATE.format(
vm_test_args=str(vm_test_args), vm_test_script=run_test_path,
vm_test_path_args=str(vm_test_path_args))) vm_test_args=str(vm_test_args),
vm_test_path_args=str(vm_test_path_args)))
os.chmod(args.script_output_path, 0750) os.chmod(args.script_output_path, 0750)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment