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 """A script for exporting and importing changes between the Chromium repo | 5 """A script for exporting and importing changes between the Chromium repo |
6 and the web-platform-tests repo. | 6 and the web-platform-tests repo. |
7 | |
8 TODO(jeffcarp): does not handle reverted changes right now | |
9 TODO(jeffcarp): it also doesn't handle changes to -expected.html files | |
10 TODO(jeffcarp): Currently this script only does export; also add an option | |
11 import as well. | |
12 """ | 7 """ |
13 | 8 |
14 import argparse | 9 import argparse |
15 import logging | 10 import logging |
16 | 11 |
17 from webkitpy.common.host import Host | 12 from webkitpy.common.host import Host |
18 from webkitpy.w3c.wpt_github import WPTGitHub | 13 from webkitpy.w3c.wpt_github import WPTGitHub |
19 from webkitpy.w3c.test_exporter import TestExporter | 14 from webkitpy.w3c.test_exporter import TestExporter |
20 from webkitpy.w3c.test_importer import configure_logging | 15 from webkitpy.w3c.test_importer import configure_logging |
21 | 16 |
22 _log = logging.getLogger(__name__) | 17 _log = logging.getLogger(__name__) |
23 | 18 |
24 | 19 |
25 def main(): | 20 def main(): |
26 configure_logging() | 21 configure_logging() |
27 options = parse_args() | 22 options = parse_args() |
28 host = Host() | 23 host = Host() |
29 wpt_github = WPTGitHub(host) | 24 wpt_github = WPTGitHub(host) |
30 test_exporter = TestExporter(host, wpt_github, dry_run=options.dry_run) | 25 test_exporter = TestExporter(host, wpt_github, dry_run=options.dry_run) |
31 | 26 |
32 test_exporter.run() | 27 test_exporter.run() |
33 | 28 |
34 | 29 |
35 def parse_args(): | 30 def parse_args(): |
36 parser = argparse.ArgumentParser(description='WPT Sync') | 31 parser = argparse.ArgumentParser(description='WPT Sync') |
37 parser.add_argument('--no-fetch', action='store_true') | 32 parser.add_argument('--no-fetch', action='store_true') |
38 parser.add_argument('--dry-run', action='store_true') | 33 parser.add_argument('--dry-run', action='store_true') |
39 return parser.parse_args() | 34 return parser.parse_args() |
OLD | NEW |