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

Side by Side Diff: mojo/devtools/common/devtoolslib/shell_arguments.py

Issue 1437383002: Never try to use root to run the mojo tools. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Produces configured shell abstractions. 5 """Produces configured shell abstractions.
6 6
7 This module knows how to produce a configured shell abstraction based on 7 This module knows how to produce a configured shell abstraction based on
8 shell_config.ShellConfig. 8 shell_config.ShellConfig.
9 """ 9 """
10 10
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 |shell_args| is updated list of shell arguments. 191 |shell_args| is updated list of shell arguments.
192 192
193 Throws: 193 Throws:
194 ShellConfigurationException if shell abstraction could not be configured. 194 ShellConfigurationException if shell abstraction could not be configured.
195 """ 195 """
196 if shell_config.android: 196 if shell_config.android:
197 shell = AndroidShell(shell_config.adb_path, shell_config.target_device, 197 shell = AndroidShell(shell_config.adb_path, shell_config.target_device,
198 logcat_tags=shell_config.logcat_tags, 198 logcat_tags=shell_config.logcat_tags,
199 verbose=shell_config.verbose) 199 verbose=shell_config.verbose)
200 200
201 device_status, error = shell.check_device( 201 device_status, error = shell.check_device()
202 require_root=shell_config.require_root)
203 if not device_status: 202 if not device_status:
204 raise ShellConfigurationException('Device check failed: ' + error) 203 raise ShellConfigurationException('Device check failed: ' + error)
205 if shell_config.shell_path: 204 if shell_config.shell_path:
206 shell.install_apk(shell_config.shell_path) 205 shell.install_apk(shell_config.shell_path)
207 else: 206 else:
208 if not shell_config.shell_path: 207 if not shell_config.shell_path:
209 raise ShellConfigurationException('Can not run without a shell binary. ' 208 raise ShellConfigurationException('Can not run without a shell binary. '
210 'Please pass --shell-path.') 209 'Please pass --shell-path.')
211 shell = LinuxShell(shell_config.shell_path) 210 shell = LinuxShell(shell_config.shell_path)
212 if shell_config.use_osmesa: 211 if shell_config.use_osmesa:
(...skipping 18 matching lines...) Expand all
231 shell_args = append_to_argument(shell_args, '--content-handlers=', 230 shell_args = append_to_argument(shell_args, '--content-handlers=',
232 '%s,%s' % (mime_type, 231 '%s,%s' % (mime_type,
233 content_handler_url)) 232 content_handler_url))
234 233
235 for dev_server_config in shell_config.dev_servers: 234 for dev_server_config in shell_config.dev_servers:
236 shell_args = _configure_dev_server(shell, shell_args, dev_server_config, 235 shell_args = _configure_dev_server(shell, shell_args, dev_server_config,
237 shell_config.reuse_servers, 236 shell_config.reuse_servers,
238 shell_config.verbose) 237 shell_config.verbose)
239 238
240 return shell, shell_args 239 return shell, shell_args
OLDNEW
« no previous file with comments | « mojo/devtools/common/devtoolslib/android_shell.py ('k') | mojo/devtools/common/devtoolslib/shell_config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698