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 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1144 """ | 1144 """ |
1145 assert not self._websocket_server, 'Already running a websocket server.' | 1145 assert not self._websocket_server, 'Already running a websocket server.' |
1146 | 1146 |
1147 server = pywebsocket.PyWebSocket(self, self.results_directory()) | 1147 server = pywebsocket.PyWebSocket(self, self.results_directory()) |
1148 server.start() | 1148 server.start() |
1149 self._websocket_server = server | 1149 self._websocket_server = server |
1150 | 1150 |
1151 @staticmethod | 1151 @staticmethod |
1152 def is_wptserve_test(test): | 1152 def is_wptserve_test(test): |
1153 """Whether wptserve should be used for a given test if enabled.""" | 1153 """Whether wptserve should be used for a given test if enabled.""" |
1154 return test.startswith("external/wpt/") | 1154 return "external/wpt/" in test |
tkent
2017/03/13 06:50:32
Please add test to base_unittest.py
qyearsley
2017/03/14 19:46:10
Could potentially note that we're looking for this
| |
1155 | 1155 |
1156 def should_use_wptserve(self, test): | 1156 def should_use_wptserve(self, test): |
1157 return self.is_wptserve_test(test) | 1157 return self.is_wptserve_test(test) |
1158 | 1158 |
1159 def start_wptserve(self): | 1159 def start_wptserve(self): |
1160 """Starts a WPT web server. | 1160 """Starts a WPT web server. |
1161 | 1161 |
1162 Raises an error if it can't start or is already running. | 1162 Raises an error if it can't start or is already running. |
1163 """ | 1163 """ |
1164 assert not self._wpt_server, 'Already running a WPT server.' | 1164 assert not self._wpt_server, 'Already running a WPT server.' |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1635 | 1635 |
1636 def __init__(self, base, args, reference_args=None): | 1636 def __init__(self, base, args, reference_args=None): |
1637 self.name = base | 1637 self.name = base |
1638 self.base = base | 1638 self.base = base |
1639 self.args = args | 1639 self.args = args |
1640 self.reference_args = args if reference_args is None else reference_args | 1640 self.reference_args = args if reference_args is None else reference_args |
1641 self.tests = set() | 1641 self.tests = set() |
1642 | 1642 |
1643 def __repr__(self): | 1643 def __repr__(self): |
1644 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args) | 1644 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args) |
OLD | NEW |