OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/env python | |
2 # | |
3 # Copyright 2013 The Chromium Authors. All rights reserved. | |
4 # Use of this source code is governed by a BSD-style license that can be | |
5 # found in the LICENSE file. | |
6 | |
7 import optparse | |
8 import os | |
9 import subprocess | |
10 import sys | |
11 | |
12 from pylib import build_utils | |
13 | |
14 | |
15 def main(argv): | |
16 parser = optparse.OptionParser() | |
17 parser.add_option('--android-sdk-tools', action='store') | |
18 parser.add_option('--apk-path', action='store') | |
19 parser.add_option('--stamp', action='store') | |
20 options, _ = parser.parse_args() | |
21 | |
22 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.
| |
23 os.path.join(options.android_sdk_tools, 'adb'), | |
24 'install', '-r', | |
25 options.apk_path] | |
26 | |
27 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.
| |
28 | |
29 if options.stamp: | |
30 build_utils.Touch(options.stamp) | |
31 | |
32 | |
33 if __name__ == '__main__': | |
34 sys.exit(main(sys.argv)) | |
OLD | NEW |