diff options
author | Kevin Lubick <kjlubick@google.com> | 2017-10-13 08:15:09 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-13 13:13:47 +0000 |
commit | cccaef1667857432a68051000ab3f338fc2e64b6 (patch) | |
tree | f7d3a2527cdc874969a06a1aea93ea36f7dd7408 | |
parent | bd27d1de7ac766de3eaf596eb82c6b2ab7f7677b (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>
8 files changed, 19 insertions, 9 deletions
diff --git a/infra/bots/README.recipes.md b/infra/bots/README.recipes.md index b9795d4143..ed9b21e874 100644 --- a/infra/bots/README.recipes.md +++ b/infra/bots/README.recipes.md @@ -811,7 +811,7 @@ Recipe for the Skia RecreateSKPs Bot. [DEPS](/infra/bots/recipes/skpbench.py#12): [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step], [recipe\_engine/time][recipe_engine/recipe_modules/time], [core](#recipe_modules-core), [flavor](#recipe_modules-flavor), [run](#recipe_modules-run), [vars](#recipe_modules-vars) -— **def [RunSteps](/infra/bots/recipes/skpbench.py#103)(api):** +— **def [RunSteps](/infra/bots/recipes/skpbench.py#104)(api):** — **def [skpbench\_steps](/infra/bots/recipes/skpbench.py#41)(api):** diff --git a/infra/bots/recipes/skpbench.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-Android_Skpbench.json b/infra/bots/recipes/skpbench.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-Android_Skpbench.json index 1cc394c49d..2007fb7115 100644 --- a/infra/bots/recipes/skpbench.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-Android_Skpbench.json +++ b/infra/bots/recipes/skpbench.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-Android_Skpbench.json @@ -209,6 +209,8 @@ "/data/local/tmp/skpbench", "/sdcard/revenge_of_the_skiabot/skps", "--adb", + "--adb_binary", + "adb.1.0.35", "--resultsfile", "[CUSTOM_[SWARM_OUT_DIR]]/table", "--config", diff --git a/infra/bots/recipes/skpbench.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-Android_Vulkan_Skpbench.json b/infra/bots/recipes/skpbench.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-Android_Vulkan_Skpbench.json index 014d357034..1c9b3e4212 100644 --- a/infra/bots/recipes/skpbench.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-Android_Vulkan_Skpbench.json +++ b/infra/bots/recipes/skpbench.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-Android_Vulkan_Skpbench.json @@ -209,6 +209,8 @@ "/data/local/tmp/skpbench", "/sdcard/revenge_of_the_skiabot/skps", "--adb", + "--adb_binary", + "adb.1.0.35", "--resultsfile", "[CUSTOM_[SWARM_OUT_DIR]]/table", "--config", diff --git a/infra/bots/recipes/skpbench.expected/trybot.json b/infra/bots/recipes/skpbench.expected/trybot.json index 141498f45c..586a41c6aa 100644 --- a/infra/bots/recipes/skpbench.expected/trybot.json +++ b/infra/bots/recipes/skpbench.expected/trybot.json @@ -209,6 +209,8 @@ "/data/local/tmp/skpbench", "/sdcard/revenge_of_the_skiabot/skps", "--adb", + "--adb_binary", + "adb.1.0.35", "--resultsfile", "[CUSTOM_[SWARM_OUT_DIR]]/table", "--config", diff --git a/infra/bots/recipes/skpbench.py b/infra/bots/recipes/skpbench.py index c241f1e60c..d5921530fd 100644 --- a/infra/bots/recipes/skpbench.py +++ b/infra/bots/recipes/skpbench.py @@ -54,6 +54,7 @@ def skpbench_steps(api): api.path.join(api.vars.android_bin_dir, 'skpbench'), api.path.join(api.vars.android_data_dir, 'skps'), '--adb', + '--adb_binary', ADB_BINARY, '--resultsfile', table, '--config', config, # TODO(dogben): Track down what's causing bots to die. diff --git a/tools/skpbench/_adb.py b/tools/skpbench/_adb.py index 66ef623fa5..b3b10b7bad 100644 --- a/tools/skpbench/_adb.py +++ b/tools/skpbench/_adb.py @@ -9,8 +9,8 @@ import subprocess import sys class Adb: - def __init__(self, device_serial=None, echo=False): - self.__invocation = ['adb'] + def __init__(self, device_serial=None, adb_binary=None, echo=False): + self.__invocation = [adb_binary] if device_serial: self.__invocation.extend(['-s', device_serial]) self.__echo = echo diff --git a/tools/skpbench/_adb_path.py b/tools/skpbench/_adb_path.py index 4d8bce4425..dc23fc5895 100644 --- a/tools/skpbench/_adb_path.py +++ b/tools/skpbench/_adb_path.py @@ -9,9 +9,9 @@ import subprocess __ADB = None -def init(device_serial): +def init(device_serial, adb_binary): global __ADB - __ADB = Adb(device_serial) + __ADB = Adb(device_serial, adb_binary) def join(*pathnames): return '/'.join(pathnames) 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 |