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

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

Issue 1144143009: W3C Test: Import web-platform-tests/html/semantics (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Tools/Scripts/webkitpy/w3c/test_converter.py ('k') | no next file » | 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 if not self.import_in_place and not self.options.dry_run : 374 if not self.import_in_place and not self.options.dry_run :
375 shutil.copyfile(orig_filepath, new_filepath) # The file was unmodified. 375 shutil.copyfile(orig_filepath, new_filepath) # The file was unmodified.
376 else: 376 else:
377 for prefixed_property in converted_file[0]: 377 for prefixed_property in converted_file[0]:
378 total_prefixed_properties.setdefault(prefixed_proper ty, 0) 378 total_prefixed_properties.setdefault(prefixed_proper ty, 0)
379 total_prefixed_properties[prefixed_property] += 1 379 total_prefixed_properties[prefixed_property] += 1
380 380
381 prefixed_properties.extend(set(converted_file[0]) - set( prefixed_properties)) 381 prefixed_properties.extend(set(converted_file[0]) - set( prefixed_properties))
382 if not self.options.dry_run: 382 if not self.options.dry_run:
383 outfile = open(new_filepath, 'wb') 383 outfile = open(new_filepath, 'wb')
384 outfile.write(converted_file[1]) 384 outfile.write(converted_file[1].encode('utf-8'))
385 outfile.close() 385 outfile.close()
386 else: 386 else:
387 if not self.import_in_place and not self.options.dry_run: 387 if not self.import_in_place and not self.options.dry_run:
388 shutil.copyfile(orig_filepath, new_filepath) 388 shutil.copyfile(orig_filepath, new_filepath)
389 389
390 copied_files.append(new_filepath.replace(self._webkit_root, '')) 390 copied_files.append(new_filepath.replace(self._webkit_root, ''))
391 391
392 _log.info('') 392 _log.info('')
393 _log.info('Import complete') 393 _log.info('Import complete')
394 _log.info('') 394 _log.info('')
(...skipping 12 matching lines...) Expand all
407 """ Creates a destination directory that mirrors that of the source dire ctory """ 407 """ Creates a destination directory that mirrors that of the source dire ctory """
408 408
409 new_subpath = self.dir_to_import[len(self.top_of_repo):] 409 new_subpath = self.dir_to_import[len(self.top_of_repo):]
410 410
411 destination_directory = os.path.join(self.destination_directory, new_sub path) 411 destination_directory = os.path.join(self.destination_directory, new_sub path)
412 412
413 if not os.path.exists(destination_directory): 413 if not os.path.exists(destination_directory):
414 os.makedirs(destination_directory) 414 os.makedirs(destination_directory)
415 415
416 _log.info('Tests will be imported into: %s', destination_directory) 416 _log.info('Tests will be imported into: %s', destination_directory)
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/w3c/test_converter.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698