| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Updates expectations and baselines when updating web-platform-tests. | 5 """Updates expectations and baselines when updating web-platform-tests. |
| 6 | 6 |
| 7 Specifically, this class fetches results from try bots for the current CL, then | 7 Specifically, this class fetches results from try bots for the current CL, then |
| 8 (1) downloads new baseline files for any tests that can be rebaselined, and | 8 (1) downloads new baseline files for any tests that can be rebaselined, and |
| 9 (2) updates the generic TestExpectations file for any other failing tests. | 9 (2) updates the generic TestExpectations file for any other failing tests. |
| 10 """ | 10 """ |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 _log.info(' %s', test) | 405 _log.info(' %s', test) |
| 406 if tests_to_rebaseline: | 406 if tests_to_rebaseline: |
| 407 webkit_patch = self.host.filesystem.join( | 407 webkit_patch = self.host.filesystem.join( |
| 408 self.finder.chromium_base(), self.finder.webkit_base(), self.fin
der.path_to_script('webkit-patch')) | 408 self.finder.chromium_base(), self.finder.webkit_base(), self.fin
der.path_to_script('webkit-patch')) |
| 409 self.host.executive.run_command([ | 409 self.host.executive.run_command([ |
| 410 'python', | 410 'python', |
| 411 webkit_patch, | 411 webkit_patch, |
| 412 'rebaseline-cl', | 412 'rebaseline-cl', |
| 413 '--verbose', | 413 '--verbose', |
| 414 '--no-trigger-jobs', | 414 '--no-trigger-jobs', |
| 415 '--fill-missing', |
| 415 ] + tests_to_rebaseline) | 416 ] + tests_to_rebaseline) |
| 416 return tests_results | 417 return tests_results |
| 417 | 418 |
| 418 def get_tests_to_rebaseline(self, test_results): | 419 def get_tests_to_rebaseline(self, test_results): |
| 419 """Returns a list of tests to download new baselines for. | 420 """Returns a list of tests to download new baselines for. |
| 420 | 421 |
| 421 Creates a list of tests to rebaseline depending on the tests' platform- | 422 Creates a list of tests to rebaseline depending on the tests' platform- |
| 422 specific results. In general, this will be non-ref tests that failed | 423 specific results. In general, this will be non-ref tests that failed |
| 423 due to a baseline mismatch (rather than crash or timeout). | 424 due to a baseline mismatch (rather than crash or timeout). |
| 424 | 425 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 446 if result['actual'] in ('CRASH', 'TIMEOUT', 'MISSING'): | 447 if result['actual'] in ('CRASH', 'TIMEOUT', 'MISSING'): |
| 447 return False | 448 return False |
| 448 return True | 449 return True |
| 449 | 450 |
| 450 def is_reference_test(self, test_path): | 451 def is_reference_test(self, test_path): |
| 451 """Checks whether a given file is a testharness.js test.""" | 452 """Checks whether a given file is a testharness.js test.""" |
| 452 return bool(self.port.reference_files(test_path)) | 453 return bool(self.port.reference_files(test_path)) |
| 453 | 454 |
| 454 def _get_try_bots(self): | 455 def _get_try_bots(self): |
| 455 return self.host.builders.all_try_builder_names() | 456 return self.host.builders.all_try_builder_names() |
| OLD | NEW |