Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import argparse | 6 import argparse |
| 7 import logging | 7 import logging |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 from mopy.android import AndroidShell | 10 from mopy.android import AndroidShell |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 29 default='localhost') | 29 default='localhost') |
| 30 parser.add_argument('--target-device', help='Device to run on.') | 30 parser.add_argument('--target-device', help='Device to run on.') |
| 31 launcher_args, args = parser.parse_known_args() | 31 launcher_args, args = parser.parse_known_args() |
| 32 | 32 |
| 33 config = Config(target_os=Config.OS_ANDROID, | 33 config = Config(target_os=Config.OS_ANDROID, |
| 34 target_cpu=launcher_args.target_cpu, | 34 target_cpu=launcher_args.target_cpu, |
| 35 is_debug=launcher_args.debug, | 35 is_debug=launcher_args.debug, |
| 36 apk_name="MojoRunner.apk") | 36 apk_name="MojoRunner.apk") |
| 37 paths = Paths(config) | 37 paths = Paths(config) |
| 38 shell = AndroidShell(paths.mojo_runner, paths.build_dir, paths.adb_path, | 38 shell = AndroidShell(paths.mojo_runner, paths.build_dir, paths.adb_path, |
| 39 launcher_args.target_device) | 39 launcher_args.target_device, src_root=paths.src_root) |
|
msw
2015/05/22 02:41:43
nit: not needed, or maybe add the remaining gdb su
sky
2015/05/22 17:27:24
I nuked the src_root from here, as you say it isn'
| |
| 40 | 40 |
| 41 extra_shell_args = shell.PrepareShellRun(launcher_args.origin) | 41 extra_shell_args = shell.PrepareShellRun(launcher_args.origin) |
| 42 args.extend(extra_shell_args) | 42 args.extend(extra_shell_args) |
| 43 | 43 |
| 44 shell.CleanLogs() | 44 shell.CleanLogs() |
| 45 p = shell.ShowLogs() | 45 p = shell.ShowLogs() |
| 46 shell.StartShell(args, sys.stdout, p.terminate) | 46 shell.StartShell(args, sys.stdout, p.terminate) |
| 47 return 0 | 47 return 0 |
| 48 | 48 |
| 49 | 49 |
| 50 if __name__ == "__main__": | 50 if __name__ == "__main__": |
| 51 sys.exit(main()) | 51 sys.exit(main()) |
| OLD | NEW |