| OLD | NEW |
| 1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 is_ready = self._helper.stdout.readline() | 1083 is_ready = self._helper.stdout.readline() |
| 1084 if not is_ready.startswith('ready'): | 1084 if not is_ready.startswith('ready'): |
| 1085 _log.error("layout_test_helper failed to be ready") | 1085 _log.error("layout_test_helper failed to be ready") |
| 1086 | 1086 |
| 1087 def requires_http_server(self): | 1087 def requires_http_server(self): |
| 1088 """Does the port require an HTTP server for running tests? This could | 1088 """Does the port require an HTTP server for running tests? This could |
| 1089 be the case when the tests aren't run on the host platform.""" | 1089 be the case when the tests aren't run on the host platform.""" |
| 1090 return True | 1090 return True |
| 1091 | 1091 |
| 1092 def _sky_sdk_path(self): | 1092 def _sky_sdk_path(self): |
| 1093 return self._build_path('gen/sky_sdk') | 1093 return self._build_path('gen/dart-pkg') |
| 1094 | 1094 |
| 1095 def _dart_packages_root(self): | 1095 def _dart_packages_root(self): |
| 1096 return os.path.join(self._sky_sdk_path(), 'packages_root') | 1096 return os.path.join(self._sky_sdk_path(), 'packages') |
| 1097 | 1097 |
| 1098 def server_command_line(self): | 1098 def server_command_line(self): |
| 1099 path = (self._options.path_to_server or | 1099 path = (self._options.path_to_server or |
| 1100 self.path_from_chromium_base('out', 'downloads', 'sky_server')) | 1100 self.path_from_chromium_base('out', 'downloads', 'sky_server')) |
| 1101 return [ | 1101 return [ |
| 1102 path, | 1102 path, |
| 1103 '-t', self.get_option('configuration'), | 1103 '-t', self.get_option('configuration'), |
| 1104 self.path_from_chromium_base(), | 1104 self.path_from_chromium_base(), |
| 1105 '8000', | 1105 '8000', |
| 1106 self._dart_packages_root() | 1106 self._dart_packages_root() |
| 1107 ] | 1107 ] |
| 1108 | 1108 |
| 1109 def start_http_server(self, additional_dirs, number_of_drivers): | 1109 def start_http_server(self, additional_dirs, number_of_drivers): |
| 1110 """Start a web server. Raise an error if it can't start or is already ru
nning. | 1110 """Start a web server. Raise an error if it can't start or is already ru
nning. |
| 1111 | 1111 |
| 1112 Ports can stub this out if they don't need a web server to be running.""
" | 1112 Ports can stub this out if they don't need a web server to be running.""
" |
| 1113 assert not self._http_server, 'Already running an http server.' | 1113 assert not self._http_server, 'Already running an http server.' |
| 1114 subprocess.call(self.path_to_script('download_sky_server')) | 1114 subprocess.call(self.path_to_script('download_sky_server')) |
| 1115 print # Make blank line before calling deploy_sdk. | |
| 1116 subprocess.call([ | |
| 1117 self.path_to_script('deploy_sdk.py'), | |
| 1118 '--build-dir', self._build_path(), | |
| 1119 '--non-interactive', | |
| 1120 '--dev-environment', | |
| 1121 self._sky_sdk_path(), | |
| 1122 '--fake-pub-get-into', | |
| 1123 self._dart_packages_root() | |
| 1124 ]) | |
| 1125 | |
| 1126 self._http_server = subprocess.Popen(self.server_command_line()) | 1115 self._http_server = subprocess.Popen(self.server_command_line()) |
| 1127 | 1116 |
| 1128 def start_websocket_server(self): | 1117 def start_websocket_server(self): |
| 1129 """Start a web server. Raise an error if it can't start or is already ru
nning. | 1118 """Start a web server. Raise an error if it can't start or is already ru
nning. |
| 1130 | 1119 |
| 1131 Ports can stub this out if they don't need a websocket server to be runn
ing.""" | 1120 Ports can stub this out if they don't need a websocket server to be runn
ing.""" |
| 1132 assert not self._websocket_server, 'Already running a websocket server.' | 1121 assert not self._websocket_server, 'Already running a websocket server.' |
| 1133 | 1122 |
| 1134 server = pywebsocket.PyWebSocket(self, self.results_directory()) | 1123 server = pywebsocket.PyWebSocket(self, self.results_directory()) |
| 1135 server.start() | 1124 server.start() |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1791 | 1780 |
| 1792 class PhysicalTestSuite(object): | 1781 class PhysicalTestSuite(object): |
| 1793 def __init__(self, base, args): | 1782 def __init__(self, base, args): |
| 1794 self.name = base | 1783 self.name = base |
| 1795 self.base = base | 1784 self.base = base |
| 1796 self.args = args | 1785 self.args = args |
| 1797 self.tests = set() | 1786 self.tests = set() |
| 1798 | 1787 |
| 1799 def __repr__(self): | 1788 def __repr__(self): |
| 1800 return "PhysicalTestSuite('%s', '%s', %s)" % (self.name, self.base, self
.args) | 1789 return "PhysicalTestSuite('%s', '%s', %s)" % (self.name, self.base, self
.args) |
| OLD | NEW |