Weizhong Xia | 6f1f80e1 | 2022-06-11 00:36:26 | [diff] [blame] | 1 | #!/usr/bin/env vpython3 |
Avi Drissman | 047c7dc | 2022-09-27 23:23:14 | [diff] [blame] | 2 | # Copyright 2014 The Chromium Authors |
Kent Tamura | 9f6e52e9 | 2018-04-13 00:42:12 | [diff] [blame] | 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
Kent Tamura | 9f6e52e9 | 2018-04-13 00:42:12 | [diff] [blame] | 5 | """Pulls the latest revisions of the web-platform-tests.""" |
| 6 | |
Kent Tamura | dd01f0e | 2018-04-24 02:32:36 | [diff] [blame] | 7 | from blinkpy.common import exit_codes |
| 8 | from blinkpy.common.host import Host |
Robert Ma | 659eb2c | 2018-10-01 15:36:42 | [diff] [blame] | 9 | from blinkpy.common.path_finder import add_depot_tools_dir_to_os_path |
Kent Tamura | c1e4c41 | 2018-04-19 02:01:36 | [diff] [blame] | 10 | from blinkpy.w3c.test_importer import TestImporter |
Kent Tamura | 9f6e52e9 | 2018-04-13 00:42:12 | [diff] [blame] | 11 | |
| 12 | |
| 13 | def main(): |
Robert Ma | 659eb2c | 2018-10-01 15:36:42 | [diff] [blame] | 14 | add_depot_tools_dir_to_os_path() |
Kent Tamura | 9f6e52e9 | 2018-04-13 00:42:12 | [diff] [blame] | 15 | host = Host() |
| 16 | importer = TestImporter(host) |
| 17 | try: |
| 18 | host.exit(importer.main()) |
| 19 | except KeyboardInterrupt: |
| 20 | host.print_("Interrupted, exiting") |
| 21 | host.exit(exit_codes.INTERRUPTED_EXIT_STATUS) |
| 22 | |
| 23 | |
| 24 | if __name__ == '__main__': |
| 25 | main() |