Chromium Code Reviews| Index: third_party/WebKit/Tools/Scripts/wpt-export |
| diff --git a/third_party/WebKit/Tools/Scripts/wpt-export b/third_party/WebKit/Tools/Scripts/wpt-export |
| new file mode 100755 |
| index 0000000000000000000000000000000000000000..b6dc52904602188d1dcc05a0720f845a8ea9a402 |
| --- /dev/null |
| +++ b/third_party/WebKit/Tools/Scripts/wpt-export |
| @@ -0,0 +1,41 @@ |
| +#!/usr/bin/env python |
| +# Copyright 2016 The Chromium Authors. All rights reserved. |
|
jeffcarp
2017/01/20 22:19:13
Should this be 2017 since it's a new file?
qyearsley
2017/01/20 23:22:42
Yeah!
|
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +"""Exports local changes to web-platform-tests in Chromium to upstream repo. |
| + |
| +This script checks LayoutTests/external/wpt for changes that can be exported, |
| +then creates a patch, and creates and lands a pull request for the upstream |
| +repository. |
| +""" |
| + |
| +import argparse |
| +import logging |
| + |
| +from webkitpy.common.host import Host |
| +from webkitpy.w3c.test_exporter import TestExporter |
| +from webkitpy.w3c.wpt_github import WPTGitHub |
| + |
| + |
| +_log = logging.getLogger(__name__) |
| + |
| + |
| +def main(): |
| + logging.basicConfig(level=logging.INFO, format='%(message)s') |
| + |
| + parser = argparse.ArgumentParser(description=__doc__) |
| + parser.add_argument( |
| + '--dry-run', action='store_true', |
| + help='See what would be done without actually making a pull request.') |
|
jeffcarp
2017/01/20 22:19:13
This only covers half of the use case - maybe add
qyearsley
2017/01/20 23:22:42
SGTM
|
| + args = parser.parse_args() |
| + |
| + host = Host() |
| + wpt_github = WPTGitHub(host) |
| + test_exporter = TestExporter(host, wpt_github, dry_run=args.dry_run) |
| + |
| + test_exporter.run() |
| + |
| + |
| +if __name__ == '__main__': |
| + main() |
|
jeffcarp
2017/01/20 22:19:13
2 spaces indentation here instead of 4
qyearsley
2017/01/20 23:22:42
Good catch
|