| 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 """Utility functions used both when importing and exporting.""" | 5 """Utility functions used both when importing and exporting.""" |
| 6 | 6 |
| 7 import logging | 7 import logging |
| 8 | 8 |
| 9 from webkitpy.w3c.chromium_commit import ChromiumCommit | 9 from webkitpy.w3c.chromium_commit import ChromiumCommit |
| 10 from webkitpy.w3c.chromium_finder import absolute_chromium_dir | 10 from webkitpy.w3c.chromium_finder import absolute_chromium_dir |
| 11 | 11 |
| 12 | 12 |
| 13 WPT_DEST_NAME = 'wpt' | 13 WPT_DEST_NAME = 'wpt' |
| 14 WPT_GH_REPO_URL_TEMPLATE = 'https://{}@github.com/w3c/web-platform-tests.git' | 14 WPT_GH_REPO_URL_TEMPLATE = 'https://{}@github.com/w3c/web-platform-tests.git' |
| 15 | 15 |
| 16 # TODO(qyearsley): This directory should be able to be constructed with | 16 # TODO(qyearsley): This directory should be able to be constructed with |
| 17 # WebKitFinder and WPT_DEST_NAME, plus the string "external". | 17 # PathFinder and WPT_DEST_NAME, plus the string "external". |
| 18 CHROMIUM_WPT_DIR = 'third_party/WebKit/LayoutTests/external/wpt/' | 18 CHROMIUM_WPT_DIR = 'third_party/WebKit/LayoutTests/external/wpt/' |
| 19 | 19 |
| 20 # Our mirrors of the official wpt repo, which we pull from. | 20 # Our mirrors of the official wpt repo, which we pull from. |
| 21 WPT_REPO_URL = 'https://chromium.googlesource.com/external/w3c/web-platform-test
s.git' | 21 WPT_REPO_URL = 'https://chromium.googlesource.com/external/w3c/web-platform-test
s.git' |
| 22 | 22 |
| 23 | 23 |
| 24 _log = logging.getLogger(__name__) | 24 _log = logging.getLogger(__name__) |
| 25 | 25 |
| 26 | 26 |
| 27 def exportable_commits_since(chromium_commit_hash, host, local_wpt): | 27 def exportable_commits_since(chromium_commit_hash, host, local_wpt): |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 | 71 |
| 72 def is_exportable(chromium_commit, local_wpt): | 72 def is_exportable(chromium_commit, local_wpt): |
| 73 """Checks whether a given patch is exportable and can be applied.""" | 73 """Checks whether a given patch is exportable and can be applied.""" |
| 74 patch = chromium_commit.format_patch() | 74 patch = chromium_commit.format_patch() |
| 75 | 75 |
| 76 return ('NOEXPORT=true' not in chromium_commit.message() and | 76 return ('NOEXPORT=true' not in chromium_commit.message() and |
| 77 not chromium_commit.message().startswith('Import') and | 77 not chromium_commit.message().startswith('Import') and |
| 78 patch and | 78 patch and |
| 79 local_wpt.test_patch(patch, chromium_commit)) | 79 local_wpt.test_patch(patch, chromium_commit)) |
| OLD | NEW |