| 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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 Returns: | 397 Returns: |
| 398 An updated tests_results dictionary without the platform-specific | 398 An updated tests_results dictionary without the platform-specific |
| 399 testharness.js tests that required new baselines to be downloaded | 399 testharness.js tests that required new baselines to be downloaded |
| 400 from `webkit-patch rebaseline-cl`. | 400 from `webkit-patch rebaseline-cl`. |
| 401 """ | 401 """ |
| 402 tests_to_rebaseline, tests_results = self.get_tests_to_rebaseline(tests_
results) | 402 tests_to_rebaseline, tests_results = self.get_tests_to_rebaseline(tests_
results) |
| 403 _log.info('Tests to rebaseline:') | 403 _log.info('Tests to rebaseline:') |
| 404 for test in tests_to_rebaseline: | 404 for test in tests_to_rebaseline: |
| 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.finder.path_from_tools_scripts('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([ | 408 self.host.executive.run_command([ |
| 410 'python', | 409 'python', |
| 411 webkit_patch, | 410 webkit_patch, |
| 412 'rebaseline-cl', | 411 'rebaseline-cl', |
| 413 '--verbose', | 412 '--verbose', |
| 414 '--no-trigger-jobs', | 413 '--no-trigger-jobs', |
| 415 '--fill-missing', | 414 '--fill-missing', |
| 416 ] + tests_to_rebaseline) | 415 ] + tests_to_rebaseline) |
| 417 return tests_results | 416 return tests_results |
| 418 | 417 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 447 if result['actual'] in ('CRASH', 'TIMEOUT', 'MISSING'): | 446 if result['actual'] in ('CRASH', 'TIMEOUT', 'MISSING'): |
| 448 return False | 447 return False |
| 449 return True | 448 return True |
| 450 | 449 |
| 451 def is_reference_test(self, test_path): | 450 def is_reference_test(self, test_path): |
| 452 """Checks whether a given file is a testharness.js test.""" | 451 """Checks whether a given file is a testharness.js test.""" |
| 453 return bool(self.port.reference_files(test_path)) | 452 return bool(self.port.reference_files(test_path)) |
| 454 | 453 |
| 455 def _get_try_bots(self): | 454 def _get_try_bots(self): |
| 456 return self.host.builders.all_try_builder_names() | 455 return self.host.builders.all_try_builder_names() |
| OLD | NEW |