Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(500)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_expectations_updater.py

Issue 2663623003: Simplify the initialization of Git objects in Host. (Closed)
Patch Set: Remove second paragraph in comment about awesome windows git hack Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 layout test expectations and baselines when updating w3c tests. 5 """Updates layout test expectations and baselines when updating w3c 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 10 matching lines...) Expand all
21 21
22 _log = logging.getLogger(__name__) 22 _log = logging.getLogger(__name__)
23 23
24 MARKER_COMMENT = '# ====== New tests from w3c-test-autoroller added here ======' 24 MARKER_COMMENT = '# ====== New tests from w3c-test-autoroller added here ======'
25 25
26 26
27 class WPTExpectationsUpdater(object): 27 class WPTExpectationsUpdater(object):
28 28
29 def __init__(self, host): 29 def __init__(self, host):
30 self.host = host 30 self.host = host
31 self.host.initialize_scm()
32 self.finder = WebKitFinder(self.host.filesystem) 31 self.finder = WebKitFinder(self.host.filesystem)
33 32
34 def run(self, args=None): 33 def run(self, args=None):
35 """Downloads text new baselines and adds test expectations lines.""" 34 """Downloads text new baselines and adds test expectations lines."""
36 parser = argparse.ArgumentParser(description=__doc__) 35 parser = argparse.ArgumentParser(description=__doc__)
37 parser.add_argument('-v', '--verbose', action='store_true', help='More v erbose logging.') 36 parser.add_argument('-v', '--verbose', action='store_true', help='More v erbose logging.')
38 args = parser.parse_args(args) 37 args = parser.parse_args(args)
39 38
40 log_level = logging.DEBUG if args.verbose else logging.INFO 39 log_level = logging.DEBUG if args.verbose else logging.INFO
41 logging.basicConfig(level=log_level, format='%(message)s') 40 logging.basicConfig(level=log_level, format='%(message)s')
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 376
378 Args: 377 Args:
379 test_path: A file path relative to the layout tests directory. 378 test_path: A file path relative to the layout tests directory.
380 This might correspond to a deleted file or a non-test. 379 This might correspond to a deleted file or a non-test.
381 """ 380 """
382 absolute_path = self.host.filesystem.join(self.finder.layout_tests_dir() , test_path) 381 absolute_path = self.host.filesystem.join(self.finder.layout_tests_dir() , test_path)
383 test_parser = TestParser(absolute_path, self.host) 382 test_parser = TestParser(absolute_path, self.host)
384 if not test_parser.test_doc: 383 if not test_parser.test_doc:
385 return False 384 return False
386 return test_parser.is_jstest() 385 return test_parser.is_jstest()
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698