Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(890)

Side by Side Diff: mojo/tools/android_mojo_shell.py

Issue 1162923004: Move the logic to set up a local origin for shell run to shell_arguments.py. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/devtools/common/devtoolslib/shell_arguments.py ('k') | mojo/tools/apptest_runner.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 import devtools 10 import devtools
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 config = Config(target_os=Config.OS_ANDROID, 58 config = Config(target_os=Config.OS_ANDROID,
59 target_cpu=launcher_args.target_cpu, 59 target_cpu=launcher_args.target_cpu,
60 is_debug=launcher_args.debug) 60 is_debug=launcher_args.debug)
61 paths = Paths(config) 61 paths = Paths(config)
62 verbose_pipe = sys.stdout if launcher_args.verbose else None 62 verbose_pipe = sys.stdout if launcher_args.verbose else None
63 shell = AndroidShell(paths.adb_path, launcher_args.target_device, 63 shell = AndroidShell(paths.adb_path, launcher_args.target_device,
64 logcat_tags=launcher_args.logcat_tags, 64 logcat_tags=launcher_args.logcat_tags,
65 verbose_pipe=verbose_pipe) 65 verbose_pipe=verbose_pipe)
66 shell.InstallApk(paths.target_mojo_shell_path) 66 shell.InstallApk(paths.target_mojo_shell_path)
67 args.append("--origin=" + launcher_args.origin if launcher_args.origin else 67
68 shell.SetUpLocalOrigin(paths.build_dir))
69 args = shell_arguments.RewriteMapOriginParameters(shell, args) 68 args = shell_arguments.RewriteMapOriginParameters(shell, args)
69 if launcher_args.origin:
70 args.append("--origin=" + launcher_args.origin)
71 else:
72 args.extend(shell_arguments.ConfigureLocalOrigin(shell, paths.build_dir))
70 if launcher_args.debugger: 73 if launcher_args.debugger:
71 args.extend(shell_arguments.ConfigureDebugger(shell)) 74 args.extend(shell_arguments.ConfigureDebugger(shell))
75
72 shell.Run(args) 76 shell.Run(args)
73 return 0 77 return 0
74 78
75 79
76 if __name__ == "__main__": 80 if __name__ == "__main__":
77 sys.exit(main()) 81 sys.exit(main())
OLDNEW
« no previous file with comments | « mojo/devtools/common/devtoolslib/shell_arguments.py ('k') | mojo/tools/apptest_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698