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 from skypy.skyserver import SkyServer | 6 from skypy.skyserver import SkyServer |
7 import argparse | 7 import argparse |
8 import json | 8 import json |
9 import logging | 9 import logging |
10 import os | 10 import os |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 subprocess.check_call([ | 180 subprocess.check_call([ |
181 'adb', 'forward', port_string, port_string | 181 'adb', 'forward', port_string, port_string |
182 ]) | 182 ]) |
183 self.pids['remote_sky_command_port'] = args.command_port | 183 self.pids['remote_sky_command_port'] = args.command_port |
184 | 184 |
185 shell_command = self._build_mojo_shell_command(args) | 185 shell_command = self._build_mojo_shell_command(args) |
186 | 186 |
187 if not is_android: | 187 if not is_android: |
188 # Desktop-only work-around for mojo crashing under chromoting. | 188 # Desktop-only work-around for mojo crashing under chromoting. |
189 if args.use_osmesa: | 189 if args.use_osmesa: |
190 shell_args.append( | 190 shell_command.append( |
191 '--args-for=mojo:native_viewport_service --use-osmesa') | 191 '--args-for=mojo:native_viewport_service --use-osmesa') |
192 | 192 |
193 # On android we can't launch inside gdb, but rather have to attach. | 193 # On android we can't launch inside gdb, but rather have to attach. |
194 if args.gdb: | 194 if args.gdb: |
195 shell_command = ['gdbserver', ':%s' % GDB_PORT] + shell_command | 195 shell_command = ['gdbserver', ':%s' % GDB_PORT] + shell_command |
196 | 196 |
197 print ' '.join(map(pipes.quote, shell_command)) | 197 print ' '.join(map(pipes.quote, shell_command)) |
198 self.pids['mojo_shell_pid'] = subprocess.Popen(shell_command).pid | 198 self.pids['mojo_shell_pid'] = subprocess.Popen(shell_command).pid |
199 | 199 |
200 if args.gdb and is_android: | 200 if args.gdb and is_android: |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 load_parser.set_defaults(func=self.load_command) | 394 load_parser.set_defaults(func=self.load_command) |
395 | 395 |
396 args = parser.parse_args() | 396 args = parser.parse_args() |
397 args.func(args) | 397 args.func(args) |
398 | 398 |
399 self._write_pid_file(PID_FILE_PATH, self.pids) | 399 self._write_pid_file(PID_FILE_PATH, self.pids) |
400 | 400 |
401 | 401 |
402 if __name__ == '__main__': | 402 if __name__ == '__main__': |
403 SkyDebugger().main() | 403 SkyDebugger().main() |
OLD | NEW |