Index: build/android/apk_install.py |
diff --git a/build/android/apk_install.py b/build/android/apk_install.py |
new file mode 100755 |
index 0000000000000000000000000000000000000000..3955eabda1dc2e7e30b78accecc2d173e5ef619d |
--- /dev/null |
+++ b/build/android/apk_install.py |
@@ -0,0 +1,34 @@ |
+#!/usr/bin/env python |
+# |
+# Copyright 2013 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+import optparse |
+import os |
+import subprocess |
+import sys |
+ |
+from pylib import build_utils |
+ |
+ |
+def main(argv): |
+ parser = optparse.OptionParser() |
+ parser.add_option('--android-sdk-tools', action='store') |
+ parser.add_option('--apk-path', action='store') |
+ parser.add_option('--stamp', action='store') |
+ options, _ = parser.parse_args() |
+ |
+ install_cmd = [ |
Yaron
2013/03/29 00:30:29
This only supports one device. Why not re-use buil
cjhopman
2013/03/29 01:12:39
I am hesitant to share a top level script with tes
Yaron
2013/03/29 17:18:22
Sounds reasonable. I think you raise a good point
cjhopman
2013/04/01 21:42:09
Done.
|
+ os.path.join(options.android_sdk_tools, 'adb'), |
+ 'install', '-r', |
+ options.apk_path] |
+ |
+ subprocess.check_call(install_cmd) |
Yaron
2013/03/29 00:30:29
Nit: use your fancy CheckCallDie
cjhopman
2013/04/01 21:42:09
Done.
|
+ |
+ if options.stamp: |
+ build_utils.Touch(options.stamp) |
+ |
+ |
+if __name__ == '__main__': |
+ sys.exit(main(sys.argv)) |