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 19 matching lines...) Expand all Loading... |
30 GDB_PORT = 8888 | 30 GDB_PORT = 8888 |
31 SKY_SERVER_PORT = 9999 | 31 SKY_SERVER_PORT = 9999 |
32 DEFAULT_URL = "https://raw.githubusercontent.com/domokit/mojo/master/sky/example
s/home.sky" | 32 DEFAULT_URL = "https://raw.githubusercontent.com/domokit/mojo/master/sky/example
s/home.sky" |
33 | 33 |
34 ANDROID_PACKAGE = "org.chromium.mojo.shell" | 34 ANDROID_PACKAGE = "org.chromium.mojo.shell" |
35 ANDROID_ACTIVITY = "%s/.MojoShellActivity" % ANDROID_PACKAGE | 35 ANDROID_ACTIVITY = "%s/.MojoShellActivity" % ANDROID_PACKAGE |
36 ANDROID_APK_NAME = 'MojoShell.apk' | 36 ANDROID_APK_NAME = 'MojoShell.apk' |
37 | 37 |
38 PID_FILE_PATH = "/tmp/skydb.pids" | 38 PID_FILE_PATH = "/tmp/skydb.pids" |
39 CACHE_LINKS_PATH = '/tmp/mojo_cache_links' | 39 CACHE_LINKS_PATH = '/tmp/mojo_cache_links' |
40 SYSTEM_LIBS_ROOT_PATH = '/tmp/device_libs' | 40 # TODO(iansf): Fix undefined behavior when you have more than one device attache
d. |
| 41 SYSTEM_LIBS_ROOT_PATH = '/tmp/device_libs/%s' % (subprocess.check_output(['adb',
'get-serialno']).strip()) |
41 | 42 |
42 SRC_ROOT = skypy.paths.Paths('ignored').src_root | 43 SRC_ROOT = skypy.paths.Paths('ignored').src_root |
43 ADB_PATH = os.path.join(SRC_ROOT, | 44 ADB_PATH = os.path.join(SRC_ROOT, |
44 'third_party/android_tools/sdk/platform-tools/adb') | 45 'third_party/android_tools/sdk/platform-tools/adb') |
45 | 46 |
46 | 47 |
47 # FIXME: Move this into mopy.config | 48 # FIXME: Move this into mopy.config |
48 def gn_args_from_build_dir(build_dir): | 49 def gn_args_from_build_dir(build_dir): |
49 gn_cmd = [ | 50 gn_cmd = [ |
50 'gn', 'args', | 51 'gn', 'args', |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 load_parser.set_defaults(func=self.load_command) | 637 load_parser.set_defaults(func=self.load_command) |
637 | 638 |
638 args = parser.parse_args() | 639 args = parser.parse_args() |
639 args.func(args) | 640 args.func(args) |
640 | 641 |
641 self._write_pid_file(PID_FILE_PATH, self.pids) | 642 self._write_pid_file(PID_FILE_PATH, self.pids) |
642 | 643 |
643 | 644 |
644 if __name__ == '__main__': | 645 if __name__ == '__main__': |
645 SkyDebugger().main() | 646 SkyDebugger().main() |
OLD | NEW |