| OLD | NEW |
| 1 # Copyright (C) 2012 Google Inc. All rights reserved. | 1 # Copyright (C) 2012 Google Inc. All rights reserved. |
| 2 # Copyright (C) 2012 Zoltan Horvath, Adobe Systems Incorporated. All rights rese
rved. | 2 # Copyright (C) 2012 Zoltan Horvath, Adobe Systems Incorporated. All rights rese
rved. |
| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 return True | 194 return True |
| 195 | 195 |
| 196 def _ensure_metrics(self, metric_name, unit=None): | 196 def _ensure_metrics(self, metric_name, unit=None): |
| 197 if metric_name not in self._metrics: | 197 if metric_name not in self._metrics: |
| 198 self._metrics[metric_name] = PerfTestMetric(metric_name, unit) | 198 self._metrics[metric_name] = PerfTestMetric(metric_name, unit) |
| 199 self._ordered_metrics_name.append(metric_name) | 199 self._ordered_metrics_name.append(metric_name) |
| 200 return self._metrics[metric_name] | 200 return self._metrics[metric_name] |
| 201 | 201 |
| 202 def run_single(self, driver, test_path, time_out_ms, should_run_pixel_test=F
alse): | 202 def run_single(self, driver, test_path, time_out_ms, should_run_pixel_test=F
alse): |
| 203 return driver.run_test(DriverInput(test_path, time_out_ms, image_hash=No
ne, should_run_pixel_test=should_run_pixel_test, args=[]), stop_when_done=False) | 203 return driver.run_test( |
| 204 DriverInput(test_path, time_out_ms, image_hash=None, should_run_pixe
l_test=should_run_pixel_test, args=[]), stop_when_done=False) |
| 204 | 205 |
| 205 def run_failed(self, output): | 206 def run_failed(self, output): |
| 206 if output.error: | 207 if output.error: |
| 207 _log.error('error: %s\n%s' % (self.test_name(), output.error)) | 208 _log.error('error: %s\n%s' % (self.test_name(), output.error)) |
| 208 | 209 |
| 209 if output.text == None: | 210 if output.text is None: |
| 210 pass | 211 pass |
| 211 elif output.timeout: | 212 elif output.timeout: |
| 212 _log.error('timeout: %s' % self.test_name()) | 213 _log.error('timeout: %s' % self.test_name()) |
| 213 elif output.crash: | 214 elif output.crash: |
| 214 _log.error('crash: %s' % self.test_name()) | 215 _log.error('crash: %s' % self.test_name()) |
| 215 else: | 216 else: |
| 216 return False | 217 return False |
| 217 | 218 |
| 218 return True | 219 return True |
| 219 | 220 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 (re.compile(r'^Dromaeo/'), SingleProcessPerfTest), | 310 (re.compile(r'^Dromaeo/'), SingleProcessPerfTest), |
| 310 (re.compile(r'^inspector/'), ChromiumStylePerfTest), | 311 (re.compile(r'^inspector/'), ChromiumStylePerfTest), |
| 311 ] | 312 ] |
| 312 | 313 |
| 313 @classmethod | 314 @classmethod |
| 314 def create_perf_test(cls, port, test_name, path, test_runner_count=DEFAULT_T
EST_RUNNER_COUNT): | 315 def create_perf_test(cls, port, test_name, path, test_runner_count=DEFAULT_T
EST_RUNNER_COUNT): |
| 315 for (pattern, test_class) in cls._pattern_map: | 316 for (pattern, test_class) in cls._pattern_map: |
| 316 if pattern.match(test_name): | 317 if pattern.match(test_name): |
| 317 return test_class(port, test_name, path, test_runner_count) | 318 return test_class(port, test_name, path, test_runner_count) |
| 318 return PerfTest(port, test_name, path, test_runner_count) | 319 return PerfTest(port, test_name, path, test_runner_count) |
| OLD | NEW |