| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 """Pull latest revisions of a W3C test repo and make a local commit.""" | 5 """Pull latest revisions of a W3C test repo and make a local commit.""" |
| 6 | 6 |
| 7 import argparse | 7 import argparse |
| 8 import re | 8 import re |
| 9 | 9 |
| 10 from webkitpy.common.webkit_finder import WebKitFinder | 10 from webkitpy.common.webkit_finder import WebKitFinder |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 if self.target == 'wpt': | 38 if self.target == 'wpt': |
| 39 import_commitish = self.update( | 39 import_commitish = self.update( |
| 40 WPT_DEST_NAME, | 40 WPT_DEST_NAME, |
| 41 'https://chromium.googlesource.com/external/w3c/web-platform-tes
ts.git') | 41 'https://chromium.googlesource.com/external/w3c/web-platform-tes
ts.git') |
| 42 | 42 |
| 43 for resource in ['testharnessreport.js', 'WebIDLParser.js']: | 43 for resource in ['testharnessreport.js', 'WebIDLParser.js']: |
| 44 source = self.path_from_webkit_base('LayoutTests', 'resources',
resource) | 44 source = self.path_from_webkit_base('LayoutTests', 'resources',
resource) |
| 45 destination = self.path_from_webkit_base('LayoutTests', 'importe
d', WPT_DEST_NAME, 'resources', resource) | 45 destination = self.path_from_webkit_base('LayoutTests', 'importe
d', WPT_DEST_NAME, 'resources', resource) |
| 46 self.copyfile(source, destination) | 46 self.copyfile(source, destination) |
| 47 self.run(['git', 'add', destination]) | 47 self.run(['git', 'add', destination]) |
| 48 for resource in ['vendor-prefix.js']: |
| 49 source = self.path_from_webkit_base('LayoutTests', 'resources',
resource) |
| 50 destination = self.path_from_webkit_base('LayoutTests', 'importe
d', WPT_DEST_NAME, 'common', resource) |
| 51 self.copyfile(source, destination) |
| 52 self.run(['git', 'add', destination]) |
| 48 | 53 |
| 49 elif self.target == 'css': | 54 elif self.target == 'css': |
| 50 import_commitish = self.update( | 55 import_commitish = self.update( |
| 51 CSS_DEST_NAME, | 56 CSS_DEST_NAME, |
| 52 'https://chromium.googlesource.com/external/w3c/csswg-test.git') | 57 'https://chromium.googlesource.com/external/w3c/csswg-test.git') |
| 53 else: | 58 else: |
| 54 raise AssertionError("Unsupported target %s" % self.target) | 59 raise AssertionError("Unsupported target %s" % self.target) |
| 55 | 60 |
| 56 self.commit_changes_if_needed(chromium_commitish, import_commitish) | 61 self.commit_changes_if_needed(chromium_commitish, import_commitish) |
| 57 | 62 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 dest = self.path_from_webkit_base(*comps) | 214 dest = self.path_from_webkit_base(*comps) |
| 210 if self.verbose: | 215 if self.verbose: |
| 211 self.print_('rm -fr %s' % dest) | 216 self.print_('rm -fr %s' % dest) |
| 212 self.fs.rmtree(dest) | 217 self.fs.rmtree(dest) |
| 213 | 218 |
| 214 def path_from_webkit_base(self, *comps): | 219 def path_from_webkit_base(self, *comps): |
| 215 return self.finder.path_from_webkit_base(*comps) | 220 return self.finder.path_from_webkit_base(*comps) |
| 216 | 221 |
| 217 def print_(self, msg): | 222 def print_(self, msg): |
| 218 self.host.print_(msg) | 223 self.host.print_(msg) |
| OLD | NEW |