wpt_export.py 817 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env vpython3
  2. # Copyright 2017 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. """Pushes changes to web-platform-tests inside Chromium to the upstream repo."""
  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_exporter import TestExporter
  10. def main():
  11. add_depot_tools_dir_to_os_path()
  12. host = Host()
  13. exporter = TestExporter(host)
  14. try:
  15. success = exporter.main()
  16. host.exit(0 if success else 1)
  17. except KeyboardInterrupt:
  18. host.print_('Interrupted, exiting')
  19. host.exit(exit_codes.INTERRUPTED_EXIT_STATUS)
  20. if __name__ == '__main__':
  21. main()