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

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

Issue 2029823002: Fix MockFileSystem.walk and add test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Import Expectations Modified 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
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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 if not self.options.dry_run and self.import_in_place: 218 if not self.options.dry_run and self.import_in_place:
219 _log.info(" pruning %s" % path_base) 219 _log.info(" pruning %s" % path_base)
220 self.filesystem.remove(path_full) 220 self.filesystem.remove(path_full)
221 continue 221 continue
222 else: 222 else:
223 continue 223 continue
224 # FIXME: This block should really be a separate function, but th e early-continues make that difficult. 224 # FIXME: This block should really be a separate function, but th e early-continues make that difficult.
225 225
226 if filename.startswith('.') or filename.endswith('.pl'): 226 if filename.startswith('.') or filename.endswith('.pl'):
227 continue # For some reason the w3c repo contains random per l scripts we don't care about. 227 continue # For some reason the w3c repo contains random per l scripts we don't care about.
228 if filename == 'OWNERS':
229 continue # These files fail our presubmits
230
228 231
229 fullpath = self.filesystem.join(root, filename) 232 fullpath = self.filesystem.join(root, filename)
230 233
231 mimetype = mimetypes.guess_type(fullpath) 234 mimetype = mimetypes.guess_type(fullpath)
232 if not 'html' in str(mimetype[0]) and not 'application/xhtml+xml ' in str(mimetype[0]) and not 'application/xml' in str(mimetype[0]): 235 if not 'html' in str(mimetype[0]) and not 'application/xhtml+xml ' in str(mimetype[0]) and not 'application/xml' in str(mimetype[0]):
233 copy_list.append({'src': fullpath, 'dest': filename}) 236 copy_list.append({'src': fullpath, 'dest': filename})
234 continue 237 continue
235 238
236 if self.filesystem.basename(root) in DIRS_TO_INCLUDE: 239 if self.filesystem.basename(root) in DIRS_TO_INCLUDE:
237 copy_list.append({'src': fullpath, 'dest': filename}) 240 copy_list.append({'src': fullpath, 'dest': filename})
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 """ Creates a destination directory that mirrors that of the source dire ctory """ 418 """ Creates a destination directory that mirrors that of the source dire ctory """
416 419
417 new_subpath = self.dir_to_import[len(self.top_of_repo):] 420 new_subpath = self.dir_to_import[len(self.top_of_repo):]
418 421
419 destination_directory = self.filesystem.join(self.destination_directory, new_subpath) 422 destination_directory = self.filesystem.join(self.destination_directory, new_subpath)
420 423
421 if not self.filesystem.exists(destination_directory): 424 if not self.filesystem.exists(destination_directory):
422 self.filesystem.maybe_make_directory(destination_directory) 425 self.filesystem.maybe_make_directory(destination_directory)
423 426
424 _log.info('Tests will be imported into: %s', destination_directory) 427 _log.info('Tests will be imported into: %s', destination_directory)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698