aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skpbench/skpbench.py
diff options
context:
space:
mode:
authorGravatar Kevin Lubick <kjlubick@google.com>2017-10-13 08:15:09 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-13 13:13:47 +0000
commitcccaef1667857432a68051000ab3f338fc2e64b6 (patch)
treef7d3a2527cdc874969a06a1aea93ea36f7dd7408 /tools/skpbench/skpbench.py
parentbd27d1de7ac766de3eaf596eb82c6b2ab7f7677b (diff)
Modify skpbench to use newer adb version
Bug: skia: NOTRY=true Change-Id: Ib630d352b6922280ef5772e6843f8f031baeffaf Reviewed-on: https://skia-review.googlesource.com/59161 Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
Diffstat (limited to 'tools/skpbench/skpbench.py')
-rwxr-xr-xtools/skpbench/skpbench.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/skpbench/skpbench.py b/tools/skpbench/skpbench.py
index ef44577c53..6b4c555a76 100755
--- a/tools/skpbench/skpbench.py
+++ b/tools/skpbench/skpbench.py
@@ -61,11 +61,13 @@ __argparse.add_argument('-a', '--resultsfile',
__argparse.add_argument('skps',
nargs='+',
help=".skp files or directories to expand for .skp files")
+__argparse.add_argument('--adb_binary', default='adb',
+ help="The name of the adb binary to use.")
FLAGS = __argparse.parse_args()
if FLAGS.adb:
import _adb_path as _path
- _path.init(FLAGS.device_serial)
+ _path.init(FLAGS.device_serial, FLAGS.adb_binary)
else:
import _os_path as _path
@@ -110,9 +112,9 @@ class SKPBench:
ARGV.extend(['--fps', 'true'])
if FLAGS.adb:
if FLAGS.device_serial is None:
- ARGV[:0] = ['adb', 'shell']
+ ARGV[:0] = [FLAGS.adb_binary, 'shell']
else:
- ARGV[:0] = ['adb', '-s', FLAGS.device_serial, 'shell']
+ ARGV[:0] = [FLAGS.adb_binary, '-s', FLAGS.device_serial, 'shell']
@classmethod
def get_header(cls, outfile=sys.stdout):
@@ -278,7 +280,8 @@ def main():
skps = _path.find_skps(FLAGS.skps)
if FLAGS.adb:
- adb = Adb(FLAGS.device_serial, echo=(FLAGS.verbosity >= 5))
+ adb = Adb(FLAGS.device_serial, FLAGS.adb_binary,
+ echo=(FLAGS.verbosity >= 5))
model = adb.check('getprop ro.product.model').strip()
if model == 'Pixel C':
from _hardware_pixel_c import HardwarePixelC