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

Side by Side Diff: mojo/devtools/common/mojo_run

Issue 1256843004: Merge --origin and --origin-path in devtools scripts. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 4 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 from devtoolslib import paths 10 from devtoolslib import paths
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 script_args, shell_args = parser.parse_known_args() 84 script_args, shell_args = parser.parse_known_args()
85 85
86 # Infer paths based on the config if running within a Chromium-like checkout. 86 # Infer paths based on the config if running within a Chromium-like checkout.
87 mojo_paths, _ = paths.infer_mojo_paths(script_args.android, 87 mojo_paths, _ = paths.infer_mojo_paths(script_args.android,
88 script_args.debug, 88 script_args.debug,
89 script_args.target_cpu) 89 script_args.target_cpu)
90 if mojo_paths: 90 if mojo_paths:
91 if script_args.android and not script_args.adb_path: 91 if script_args.android and not script_args.adb_path:
92 script_args.adb_path = mojo_paths['adb'] 92 script_args.adb_path = mojo_paths['adb']
93 if script_args.android and not script_args.origin_path: 93 if script_args.android and not script_args.origin:
94 script_args.origin_path = mojo_paths['build'] 94 script_args.origin = mojo_paths['build']
95 if not script_args.shell_path: 95 if not script_args.shell_path:
96 script_args.shell_path = mojo_paths['shell'] 96 script_args.shell_path = mojo_paths['shell']
97 97
98 if script_args.verbose: 98 if script_args.verbose:
99 print 'Running within a Chromium-style checkout.' 99 print 'Running within a Chromium-style checkout.'
100 print ' - using the locally built shell at ' + script_args.shell_path 100 print ' - using the locally built shell at: ' + script_args.shell_path
101 if script_args.origin_path: 101 if script_args.origin:
102 print ' - using the local origin of ' + script_args.origin_path 102 print ' - using the origin: ' + script_args.origin
103 if script_args.android: 103 if script_args.android:
104 print ' - using adb path of ' + script_args.adb_path 104 print ' - using the adb path: ' + script_args.adb_path
105 elif script_args.verbose: 105 elif script_args.verbose:
106 print 'Running outside a Chromium-style checkout.' 106 print 'Running outside a Chromium-style checkout.'
107 107
108 try: 108 try:
109 shell, shell_args = shell_arguments.ConfigureShell(script_args, shell_args) 109 shell, shell_args = shell_arguments.ConfigureShell(script_args, shell_args)
110 except shell_arguments.ShellConfigurationException as e: 110 except shell_arguments.ShellConfigurationException as e:
111 print e 111 print e
112 return 1 112 return 1
113 113
114 if not script_args.no_debugger: 114 if not script_args.no_debugger:
(...skipping 18 matching lines...) Expand all
133 133
134 if script_args.verbose: 134 if script_args.verbose:
135 print "Shell arguments: " + str(shell_args) 135 print "Shell arguments: " + str(shell_args)
136 136
137 shell.Run(shell_args) 137 shell.Run(shell_args)
138 return 0 138 return 0
139 139
140 140
141 if __name__ == "__main__": 141 if __name__ == "__main__":
142 sys.exit(main()) 142 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