| Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py
|
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py
|
| index d7f5b4de58e3a7336669c8ec0e8c52f8ca9d6a65..782d5a4d6384d1b73f8f1d0f456b3a40ca91b517 100644
|
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py
|
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py
|
| @@ -35,6 +35,12 @@ class TestExporter(object):
|
| _log.info('Merging...')
|
| self.wpt_github.merge_pull_request(pull_request['number'])
|
| _log.info('PR merged!')
|
| + # TODO(jeffcarp): Delete remote branch after merging
|
| +
|
| + # The script needs to stop here since the Chromium
|
| + # WPT mirror lags behind a little bit. Also, it's probably safer
|
| + # to not be merging and creating a PR in the same run.
|
| + return
|
| elif len(pull_requests) > 1:
|
| _log.error(pull_requests)
|
| # TODO(jeffcarp): Print links to PRs
|
| @@ -43,7 +49,7 @@ class TestExporter(object):
|
| # Second, look for exportable commits in Chromium
|
| # At this point, no in-flight PRs should exist
|
| # If there was an issue merging, it should have errored out
|
| - local_wpt = LocalWPT(self.host, use_github=False)
|
| + local_wpt = LocalWPT(self.host, use_github=True)
|
| chromium_wpt = ChromiumWPT(self.host)
|
|
|
| # TODO(jeffcarp): have the script running this fetch Chromium origin/master
|
| @@ -65,6 +71,16 @@ class TestExporter(object):
|
| # TODO(jeffcarp): Have this function return ChromiumCommits
|
| exportable_commits = chromium_wpt.exportable_commits_since(chromium_commit.sha)
|
|
|
| + def has_patch(commit):
|
| + # TODO(jeffcarp): now do a test comparison of patch against local WPT
|
| + # TODO(jeffcarp): dedupe from format_patch below
|
| + outbound_commit = ChromiumCommit(self.host, sha=commit)
|
| + patch = outbound_commit.format_patch()
|
| + output = local_wpt.test_patch(patch)
|
| + return bool(output)
|
| +
|
| + exportable_commits = filter(has_patch, exportable_commits)
|
| +
|
| if not exportable_commits:
|
| _log.info('No exportable commits found in Chromium, stopping.')
|
| return
|
| @@ -80,8 +96,6 @@ class TestExporter(object):
|
| patch = outbound_commit.format_patch()
|
| message = outbound_commit.message()
|
|
|
| - # TODO: now do a test comparison of patch against local WPT
|
| -
|
| if self.dry_run:
|
| _log.info('[dry_run] Stopping before creating PR')
|
| _log.info('\n\n[dry_run] message:')
|
| @@ -96,3 +110,5 @@ class TestExporter(object):
|
| local_branch_name=local_branch_name,
|
| desc_title=outbound_commit.subject(),
|
| body=outbound_commit.body())
|
| +
|
| + # TODO(jeffcarp): Create a comment on the PR to CC foolip and qyearsley
|
|
|