wpt_import.py 758 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/env vpython3
  2. # Copyright 2014 The Chromium Authors. All rights reserved.
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. """Pulls the latest revisions of the web-platform-tests."""
  6. from blinkpy.common import exit_codes
  7. from blinkpy.common.host import Host
  8. from blinkpy.common.path_finder import add_depot_tools_dir_to_os_path
  9. from blinkpy.w3c.test_importer import TestImporter
  10. def main():
  11. add_depot_tools_dir_to_os_path()
  12. host = Host()
  13. importer = TestImporter(host)
  14. try:
  15. host.exit(importer.main())
  16. except KeyboardInterrupt:
  17. host.print_("Interrupted, exiting")
  18. host.exit(exit_codes.INTERRUPTED_EXIT_STATUS)
  19. if __name__ == '__main__':
  20. main()