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

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

Issue 2206433002: Pass Host object into test_parser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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_parser.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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 if ('html' not in str(mimetype[0]) and 227 if ('html' not in str(mimetype[0]) and
228 'application/xhtml+xml' not in str(mimetype[0]) and 228 'application/xhtml+xml' not in str(mimetype[0]) and
229 'application/xml' not in str(mimetype[0])): 229 'application/xml' not in str(mimetype[0])):
230 copy_list.append({'src': fullpath, 'dest': filename}) 230 copy_list.append({'src': fullpath, 'dest': filename})
231 continue 231 continue
232 232
233 if self.filesystem.basename(root) in DIRS_TO_INCLUDE: 233 if self.filesystem.basename(root) in DIRS_TO_INCLUDE:
234 copy_list.append({'src': fullpath, 'dest': filename}) 234 copy_list.append({'src': fullpath, 'dest': filename})
235 continue 235 continue
236 236
237 test_parser = TestParser(fullpath, vars(self.options)) 237 test_parser = TestParser(fullpath, self.host(), vars(self.option s))
238 test_info = test_parser.analyze_test() 238 test_info = test_parser.analyze_test()
239 if test_info is None: 239 if test_info is None:
240 continue 240 continue
241 241
242 if self.path_too_long(path_full): 242 if self.path_too_long(path_full):
243 _log.warning('%s skipped due to long path. ' 243 _log.warning('%s skipped due to long path. '
244 'Max length from repo base %d chars; see http:/ /crbug.com/609871.', 244 'Max length from repo base %d chars; see http:/ /crbug.com/609871.',
245 path_full, MAX_PATH_LENGTH) 245 path_full, MAX_PATH_LENGTH)
246 continue 246 continue
247 247
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 _log.info(' %s: %s', prefixed_property, total_prefixed_properti es[prefixed_property]) 404 _log.info(' %s: %s', prefixed_property, total_prefixed_properti es[prefixed_property])
405 405
406 def path_too_long(self, source_path): 406 def path_too_long(self, source_path):
407 """Checks whether a source path is too long to import. 407 """Checks whether a source path is too long to import.
408 408
409 Args: 409 Args:
410 Absolute path of file to be imported. 410 Absolute path of file to be imported.
411 """ 411 """
412 path_from_repo_base = os.path.relpath(source_path, self.source_repo_path ) 412 path_from_repo_base = os.path.relpath(source_path, self.source_repo_path )
413 return len(path_from_repo_base) > MAX_PATH_LENGTH 413 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_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698