| 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/external/wpt/' |
| 13 | 13 |
| 14 | 14 |
| 15 class TestExporter(object): | 15 class TestExporter(object): |
| 16 | 16 |
| 17 def __init__(self, host, wpt_github, dry_run=False): | 17 def __init__(self, host, wpt_github, dry_run=False): |
| 18 self.host = host | 18 self.host = host |
| 19 self.wpt_github = wpt_github | 19 self.wpt_github = wpt_github |
| 20 self.dry_run = dry_run | 20 self.dry_run = dry_run |
| 21 self.local_wpt = LocalWPT(self.host) | 21 self.local_wpt = LocalWPT(self.host) |
| 22 | 22 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 def is_exportable(chromium_commit): | 135 def is_exportable(chromium_commit): |
| 136 patch = chromium_commit.format_patch() | 136 patch = chromium_commit.format_patch() |
| 137 return ( | 137 return ( |
| 138 patch | 138 patch |
| 139 and self.local_wpt.test_patch(patch) | 139 and self.local_wpt.test_patch(patch) |
| 140 and 'NOEXPORT=true' not in chromium_commit.message() | 140 and 'NOEXPORT=true' not in chromium_commit.message() |
| 141 and not chromium_commit.message().startswith('Import ') | 141 and not chromium_commit.message().startswith('Import ') |
| 142 ) | 142 ) |
| 143 | 143 |
| 144 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 |