From 00b1069a6b22d8ea0dc6c682b5edb39297e62398 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Thu, 19 May 2016 00:13:22 -0400 Subject: [PATCH] Add an option to pick a different adb binary. This will let the recipes use the copy pulled from Chromium's android_tools. BUG=26 Change-Id: Ica6519223b9fb6daef30f3e14c72ef6422de0f6c Reviewed-on: https://boringssl-review.googlesource.com/7982 Reviewed-by: Adam Langley --- util/run_android_tests.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/run_android_tests.go b/util/run_android_tests.go index be9e6c6f..9d8f2daf 100644 --- a/util/run_android_tests.go +++ b/util/run_android_tests.go @@ -28,6 +28,7 @@ import ( var ( buildDir = flag.String("build-dir", "build", "Specifies the build directory to push.") + adbPath = flag.String("adb", "adb", "Specifies the adb binary to use. Defaults to looking in PATH.") device = flag.String("device", "", "Specifies the device or emulator. See adb's -s argument.") aarch64 = flag.Bool("aarch64", false, "Build the test runners for aarch64 instead of arm.") arm = flag.Int("arm", 7, "Which arm revision to build for.") @@ -49,7 +50,7 @@ func adb(args ...string) error { if len(*device) > 0 { args = append([]string{"-s", *device}, args...) } - cmd := exec.Command("adb", args...) + cmd := exec.Command(*adbPath, args...) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr return cmd.Run()