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 import logging | 5 import logging |
6 | 6 |
7 from webkitpy.w3c.local_wpt import LocalWPT | 7 from webkitpy.w3c.local_wpt import LocalWPT |
8 from webkitpy.w3c.chromium_commit import ChromiumCommit | 8 from webkitpy.w3c.chromium_commit import ChromiumCommit |
9 | 9 |
10 _log = logging.getLogger(__name__) | 10 _log = logging.getLogger(__name__) |
11 | 11 |
12 CHROMIUM_WPT_DIR = 'third_party/WebKit/LayoutTests/imported/wpt/' | 12 CHROMIUM_WPT_DIR = 'third_party/WebKit/LayoutTests/imported/wpt/' |
13 | 13 |
14 # TODO(jeffcarp): have the script running this fetch Chromium origin/master | |
15 # TODO(jeffcarp): move WPT fetch out of its constructor to match planned Chromiu
mWPT pattern | |
16 | 14 |
17 class TestExporter(object): | 15 class TestExporter(object): |
18 | 16 |
19 def __init__(self, host, wpt_github, dry_run=False): | 17 def __init__(self, host, wpt_github, dry_run=False): |
20 self.host = host | 18 self.host = host |
21 self.wpt_github = wpt_github | 19 self.wpt_github = wpt_github |
22 self.dry_run = dry_run | 20 self.dry_run = dry_run |
23 self.local_wpt = LocalWPT(self.host) | 21 self.local_wpt = LocalWPT(self.host) |
24 | 22 |
25 def run(self): | 23 def run(self): |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 def is_exportable(chromium_commit): | 135 def is_exportable(chromium_commit): |
138 patch = chromium_commit.format_patch() | 136 patch = chromium_commit.format_patch() |
139 return ( | 137 return ( |
140 patch | 138 patch |
141 and self.local_wpt.test_patch(patch) | 139 and self.local_wpt.test_patch(patch) |
142 and 'NOEXPORT=true' not in chromium_commit.message() | 140 and 'NOEXPORT=true' not in chromium_commit.message() |
143 and not chromium_commit.message().startswith('Import ') | 141 and not chromium_commit.message().startswith('Import ') |
144 ) | 142 ) |
145 | 143 |
146 return [c for c in chromium_commits if is_exportable(c)] | 144 return [c for c in chromium_commits if is_exportable(c)] |
OLD | NEW |