| 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 """Functionality for adding TestExpectations lines and downloading baselines | 5 """Functionality for adding TestExpectations lines and downloading baselines |
| 6 based on layout test failures in try jobs. | 6 based on layout test failures in try jobs. |
| 7 | 7 |
| 8 This script is used as part of the w3c test auto-import process. | 8 This script is used as part of the w3c test auto-import process. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 """ | 285 """ |
| 286 finder = WebKitFinder(self._host.filesystem) | 286 finder = WebKitFinder(self._host.filesystem) |
| 287 tests = self._host.executive.run_command(['git', 'diff', 'master', '--na
me-only']).splitlines() | 287 tests = self._host.executive.run_command(['git', 'diff', 'master', '--na
me-only']).splitlines() |
| 288 tests_to_rebaseline, tests_results = self.get_tests_to_rebaseline(finder
, tests, tests_results) | 288 tests_to_rebaseline, tests_results = self.get_tests_to_rebaseline(finder
, tests, tests_results) |
| 289 if tests_to_rebaseline: | 289 if tests_to_rebaseline: |
| 290 webkit_patch = self._host.filesystem.join( | 290 webkit_patch = self._host.filesystem.join( |
| 291 finder.chromium_base(), finder.webkit_base(), finder.path_to_scr
ipt('webkit-patch')) | 291 finder.chromium_base(), finder.webkit_base(), finder.path_to_scr
ipt('webkit-patch')) |
| 292 self._host.executive.run_command([ | 292 self._host.executive.run_command([ |
| 293 'python', | 293 'python', |
| 294 webkit_patch, | 294 webkit_patch, |
| 295 'rebaseline-from-try-jobs', '-v' | 295 'rebaseline-cl', |
| 296 '--verbose', |
| 297 '--no-trigger-jobs', |
| 296 ] + tests_to_rebaseline) | 298 ] + tests_to_rebaseline) |
| 297 return tests_results | 299 return tests_results |
| 298 | 300 |
| 299 def get_tests_to_rebaseline(self, webkit_finder, tests, tests_results): | 301 def get_tests_to_rebaseline(self, webkit_finder, tests, tests_results): |
| 300 """Returns a list of tests to download new baselines for. | 302 """Returns a list of tests to download new baselines for. |
| 301 | 303 |
| 302 Creates a list of tests to rebaseline depending on the tests' platform- | 304 Creates a list of tests to rebaseline depending on the tests' platform- |
| 303 specific results. In general, this will be non-ref tests that failed | 305 specific results. In general, this will be non-ref tests that failed |
| 304 due to a baseline mismatch (rather than crash or timeout). | 306 due to a baseline mismatch (rather than crash or timeout). |
| 305 | 307 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 322 for platform in tests_results[test_path].keys(): | 324 for platform in tests_results[test_path].keys(): |
| 323 if tests_results[test_path][platform]['actual'] not in ['CRA
SH', 'TIMEOUT']: | 325 if tests_results[test_path][platform]['actual'] not in ['CRA
SH', 'TIMEOUT']: |
| 324 del tests_results[test_path][platform] | 326 del tests_results[test_path][platform] |
| 325 tests_to_rebaseline.add(test_path) | 327 tests_to_rebaseline.add(test_path) |
| 326 return list(tests_to_rebaseline), tests_results | 328 return list(tests_to_rebaseline), tests_results |
| 327 | 329 |
| 328 def is_js_test(self, webkit_finder, test_path): | 330 def is_js_test(self, webkit_finder, test_path): |
| 329 absolute_path = self._host.filesystem.join(webkit_finder.chromium_base()
, test_path) | 331 absolute_path = self._host.filesystem.join(webkit_finder.chromium_base()
, test_path) |
| 330 test_parser = TestParser(absolute_path, self._host) | 332 test_parser = TestParser(absolute_path, self._host) |
| 331 return test_parser.is_jstest() | 333 return test_parser.is_jstest() |
| OLD | NEW |