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 <agl@google.com>
diff --git a/util/run_android_tests.go b/util/run_android_tests.go index be9e6c6..9d8f2da 100644 --- a/util/run_android_tests.go +++ b/util/run_android_tests.go
@@ -28,6 +28,7 @@ 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 @@ 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()