Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py

Issue 2045013002: Fix test_importer.py to skip files named reftest.list and add test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 1 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions 4 # modification, are permitted provided that the following conditions
5 # are met: 5 # are met:
6 # 6 #
7 # 1. Redistributions of source code must retain the above 7 # 1. Redistributions of source code must retain the above
8 # copyright notice, this list of conditions and the following 8 # copyright notice, this list of conditions and the following
9 # disclaimer. 9 # disclaimer.
10 # 2. Redistributions in binary form must reproduce the above 10 # 2. Redistributions in binary form must reproduce the above
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 if not self.options.dry_run and self.import_in_place: 223 if not self.options.dry_run and self.import_in_place:
224 _log.info(" pruning %s" % path_base) 224 _log.info(" pruning %s" % path_base)
225 self.filesystem.remove(path_full) 225 self.filesystem.remove(path_full)
226 continue 226 continue
227 else: 227 else:
228 continue 228 continue
229 # FIXME: This block should really be a separate function, but th e early-continues make that difficult. 229 # FIXME: This block should really be a separate function, but th e early-continues make that difficult.
230 230
231 if filename.startswith('.') or filename.endswith('.pl'): 231 if filename.startswith('.') or filename.endswith('.pl'):
232 continue # For some reason the w3c repo contains random per l scripts we don't care about. 232 continue # For some reason the w3c repo contains random per l scripts we don't care about.
233 if filename == 'OWNERS': 233 if filename == 'OWNERS' or filename == 'reftest.list':
234 continue # These files fail our presubmits. 234 continue # These files fail our presubmits.
235 # see http://crbug.com/584660 and
Dirk Pranke 2016/06/07 22:05:53 I probably wouldn't have added these comments; whi
236 # http://crbug.com/582838.
235 237
236 238
237 fullpath = self.filesystem.join(root, filename) 239 fullpath = self.filesystem.join(root, filename)
238 240
239 mimetype = mimetypes.guess_type(fullpath) 241 mimetype = mimetypes.guess_type(fullpath)
240 if ('html' not in str(mimetype[0]) and 242 if ('html' not in str(mimetype[0]) and
241 'application/xhtml+xml' not in str(mimetype[0]) and 243 'application/xhtml+xml' not in str(mimetype[0]) and
242 'application/xml' not in str(mimetype[0])): 244 'application/xml' not in str(mimetype[0])):
243 copy_list.append({'src': fullpath, 'dest': filename}) 245 copy_list.append({'src': fullpath, 'dest': filename})
244 continue 246 continue
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 _log.info(' %s: %s', prefixed_property, total_prefixed_properti es[prefixed_property]) 417 _log.info(' %s: %s', prefixed_property, total_prefixed_properti es[prefixed_property])
416 418
417 def path_too_long(self, source_path): 419 def path_too_long(self, source_path):
418 """Checks whether a source path is too long to import. 420 """Checks whether a source path is too long to import.
419 421
420 Args: 422 Args:
421 Absolute path of file to be imported. 423 Absolute path of file to be imported.
422 """ 424 """
423 path_from_repo_base = os.path.relpath(source_path, self.top_of_repo) 425 path_from_repo_base = os.path.relpath(source_path, self.top_of_repo)
424 return len(path_from_repo_base) > MAX_PATH_LENGTH 426 return len(path_from_repo_base) > MAX_PATH_LENGTH
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698