diff options
author | Caroline Tice <cmtice@google.com> | 2017-04-06 17:16:05 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-04-08 19:40:20 -0700 |
commit | f6ef4395fe1896ba68c80e52cb24763b0fcfe7f8 (patch) | |
tree | 7612123711db98f0746e56b66368d16b388192bd /binary_search_tool/binary_search_perforce.py | |
parent | 8c18be1425c8a4ecfc059a7c637fc93f33edab1f (diff) | |
download | toolchain-utils-f6ef4395fe1896ba68c80e52cb24763b0fcfe7f8.tar.gz |
[toolchain-utils] Fix remaining lint errors in toolchain-utils.
In addition to fixing the lint errors, this also fixes the Python
formatting issues (ran tc_pyformat on nearly all the files).
BUG=chromium:570450
TEST=Ran all crosperf & bisect tool unit tests.
Ran afe_lock_machine.py (check machine status)
Ran full crosperf test (octane, speedometer, BootPerf) on alex.
Change-Id: Ic86f9192801ac67769f3de30f1c5f0d203ce0831
Reviewed-on: https://chromium-review.googlesource.com/471886
Commit-Ready: Caroline Tice <cmtice@chromium.org>
Tested-by: Caroline Tice <cmtice@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Diffstat (limited to 'binary_search_tool/binary_search_perforce.py')
-rwxr-xr-x | binary_search_tool/binary_search_perforce.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/binary_search_tool/binary_search_perforce.py b/binary_search_tool/binary_search_perforce.py index 7ac2fba6..aaa09eef 100755 --- a/binary_search_tool/binary_search_perforce.py +++ b/binary_search_tool/binary_search_perforce.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2 +#!/usr/bin/env python2 """Module of binary serch for perforce.""" from __future__ import print_function @@ -368,8 +368,8 @@ class P4GCCBinarySearcher(P4BinarySearcher): self.CleanupCLs() # Change the revision of only the gcc part of the toolchain. command = ('cd %s/gcctools/google_vendor_src_branch/gcc ' - '&& g4 revert ...; g4 sync @%s' % - (self.checkout_dir, current_revision)) + '&& g4 revert ...; g4 sync @%s' % (self.checkout_dir, + current_revision)) self.current_ce.RunCommand(command) self.HandleBrokenCLs(current_revision) @@ -402,11 +402,13 @@ def Main(argv): '-s', '--script', dest='script', help='Script to run for every version.') options = parser.parse_args(argv) # First get all revisions - p4_paths = ['//depot2/gcctools/google_vendor_src_branch/gcc/gcc-4.4.3/...', - '//depot2/gcctools/google_vendor_src_branch/binutils/' - 'binutils-2.20.1-mobile/...', - '//depot2/gcctools/google_vendor_src_branch/' - 'binutils/binutils-20100303/...'] + p4_paths = [ + '//depot2/gcctools/google_vendor_src_branch/gcc/gcc-4.4.3/...', + '//depot2/gcctools/google_vendor_src_branch/binutils/' + 'binutils-2.20.1-mobile/...', + '//depot2/gcctools/google_vendor_src_branch/' + 'binutils/binutils-20100303/...' + ] p4gccbs = P4GCCBinarySearcher('perforce2:2666', p4_paths, '') # Main loop: @@ -425,8 +427,8 @@ def Main(argv): ce = command_executer.GetCommandExecuter() command = '%s %s' % (script, p4gccbs.checkout_dir) status = ce.RunCommand(command) - message = ('Revision: %s produced: %d status\n' % - (current_revision, status)) + message = ('Revision: %s produced: %d status\n' % (current_revision, + status)) logger.GetLogger().LogOutput(message, print_to_console=verbose) terminated = p4gccbs.SetStatus(status) num_tries -= 1 |