| OLD | NEW |
| 1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
| 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze
ged | 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze
ged |
| 3 # | 3 # |
| 4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
| 6 # met: | 6 # met: |
| 7 # | 7 # |
| 8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 self._port = port | 77 self._port = port |
| 78 self._filesystem = port.host.filesystem | 78 self._filesystem = port.host.filesystem |
| 79 self._options = options | 79 self._options = options |
| 80 self._printer = printer | 80 self._printer = printer |
| 81 self._expectations = None | 81 self._expectations = None |
| 82 | 82 |
| 83 self.HTTP_SUBDIR = 'http' + port.TEST_PATH_SEPARATOR | 83 self.HTTP_SUBDIR = 'http' + port.TEST_PATH_SEPARATOR |
| 84 self.INSPECTOR_SUBDIR = 'inspector' + port.TEST_PATH_SEPARATOR | 84 self.INSPECTOR_SUBDIR = 'inspector' + port.TEST_PATH_SEPARATOR |
| 85 self.PERF_SUBDIR = 'perf' | 85 self.PERF_SUBDIR = 'perf' |
| 86 self.WEBSOCKET_SUBDIR = 'websocket' + port.TEST_PATH_SEPARATOR | 86 self.WEBSOCKET_SUBDIR = 'websocket' + port.TEST_PATH_SEPARATOR |
| 87 self.VIRTUAL_HTTP_SUBDIR = port.TEST_PATH_SEPARATOR.join([ | |
| 88 'virtual', 'stable', 'http']) | |
| 89 self.LAYOUT_TESTS_DIRECTORY = 'LayoutTests' | 87 self.LAYOUT_TESTS_DIRECTORY = 'LayoutTests' |
| 90 self.ARCHIVED_RESULTS_LIMIT = 25 | 88 self.ARCHIVED_RESULTS_LIMIT = 25 |
| 91 self._http_server_started = False | 89 self._http_server_started = False |
| 92 self._wptserve_started = False | 90 self._wptserve_started = False |
| 93 self._websockets_server_started = False | 91 self._websockets_server_started = False |
| 94 | 92 |
| 95 self._results_directory = self._port.results_directory() | 93 self._results_directory = self._port.results_directory() |
| 96 self._finder = LayoutTestFinder(self._port, self._options) | 94 self._finder = LayoutTestFinder(self._port, self._options) |
| 97 self._runner = LayoutTestRunner(self._options, self._port, self._printer
, self._results_directory, self._test_is_slow) | 95 self._runner = LayoutTestRunner(self._options, self._port, self._printer
, self._results_directory, self._test_is_slow) |
| 98 | 96 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 initial_results, all_retry_results, enabled_pixel_tests_in_retry) | 216 initial_results, all_retry_results, enabled_pixel_tests_in_retry) |
| 219 | 217 |
| 220 def _collect_tests(self, args): | 218 def _collect_tests(self, args): |
| 221 return self._finder.find_tests(args, test_list=self._options.test_list, | 219 return self._finder.find_tests(args, test_list=self._options.test_list, |
| 222 fastest_percentile=self._options.fastest) | 220 fastest_percentile=self._options.fastest) |
| 223 | 221 |
| 224 def _is_http_test(self, test): | 222 def _is_http_test(self, test): |
| 225 return ( | 223 return ( |
| 226 test.startswith(self.HTTP_SUBDIR) or | 224 test.startswith(self.HTTP_SUBDIR) or |
| 227 self._is_websocket_test(test) or | 225 self._is_websocket_test(test) or |
| 228 self.VIRTUAL_HTTP_SUBDIR in test | 226 self._port.TEST_PATH_SEPARATOR + self.HTTP_SUBDIR in test |
| 229 ) | 227 ) |
| 230 | 228 |
| 231 def _is_inspector_test(self, test): | 229 def _is_inspector_test(self, test): |
| 232 return self.INSPECTOR_SUBDIR in test | 230 return self.INSPECTOR_SUBDIR in test |
| 233 | 231 |
| 234 def _is_websocket_test(self, test): | 232 def _is_websocket_test(self, test): |
| 235 if self._port.is_wpt_enabled() and self._port.is_wpt_test(test): | 233 if self._port.is_wpt_enabled() and self._port.is_wpt_test(test): |
| 236 return False | 234 return False |
| 237 | 235 |
| 238 return self.WEBSOCKET_SUBDIR in test | 236 return self.WEBSOCKET_SUBDIR in test |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 | 548 |
| 551 stats = {} | 549 stats = {} |
| 552 for result in initial_results.results_by_name.values(): | 550 for result in initial_results.results_by_name.values(): |
| 553 if result.type != test_expectations.SKIP: | 551 if result.type != test_expectations.SKIP: |
| 554 stats[result.test_name] = {'results': (_worker_number(result.wor
ker_name), result.test_number, result.pid, int( | 552 stats[result.test_name] = {'results': (_worker_number(result.wor
ker_name), result.test_number, result.pid, int( |
| 555 result.test_run_time * 1000), int(result.total_run_time * 10
00))} | 553 result.test_run_time * 1000), int(result.total_run_time * 10
00))} |
| 556 stats_trie = {} | 554 stats_trie = {} |
| 557 for name, value in stats.iteritems(): | 555 for name, value in stats.iteritems(): |
| 558 json_results_generator.add_path_to_trie(name, value, stats_trie) | 556 json_results_generator.add_path_to_trie(name, value, stats_trie) |
| 559 return stats_trie | 557 return stats_trie |
| OLD | NEW |