OLD | NEW |
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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 _log.info(" pruning %s" % path_base) | 212 _log.info(" pruning %s" % path_base) |
213 self.filesystem.rmtree(path_full) | 213 self.filesystem.rmtree(path_full) |
214 else: | 214 else: |
215 _log.info(" skipping %s" % path_base) | 215 _log.info(" skipping %s" % path_base) |
216 | 216 |
217 | 217 |
218 copy_list = [] | 218 copy_list = [] |
219 | 219 |
220 for filename in files: | 220 for filename in files: |
221 path_full = self.filesystem.join(root, filename) | 221 path_full = self.filesystem.join(root, filename) |
222 path_base = path_full.replace(self.layout_tests_dir + '/', '') | 222 path_base = path_full.replace(directory + '/', '') |
| 223 path_base = self.destination_directory.replace(self.layout_tests
_dir + '/', '') + '/' + path_base |
223 if path_base in paths_to_skip: | 224 if path_base in paths_to_skip: |
224 if not self.options.dry_run and self.import_in_place: | 225 if not self.options.dry_run and self.import_in_place: |
225 _log.info(" pruning %s" % path_base) | 226 _log.info(" pruning %s" % path_base) |
226 self.filesystem.remove(path_full) | 227 self.filesystem.remove(path_full) |
227 continue | 228 continue |
228 else: | 229 else: |
229 continue | 230 continue |
230 # FIXME: This block should really be a separate function, but th
e early-continues make that difficult. | 231 # FIXME: This block should really be a separate function, but th
e early-continues make that difficult. |
231 | 232 |
232 if filename.startswith('.') or filename.endswith('.pl'): | 233 if filename.startswith('.') or filename.endswith('.pl'): |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 """ Creates a destination directory that mirrors that of the source dire
ctory """ | 397 """ Creates a destination directory that mirrors that of the source dire
ctory """ |
397 | 398 |
398 new_subpath = self.dir_to_import[len(self.top_of_repo):] | 399 new_subpath = self.dir_to_import[len(self.top_of_repo):] |
399 | 400 |
400 destination_directory = os.path.join(self.destination_directory, new_sub
path) | 401 destination_directory = os.path.join(self.destination_directory, new_sub
path) |
401 | 402 |
402 if not os.path.exists(destination_directory): | 403 if not os.path.exists(destination_directory): |
403 os.makedirs(destination_directory) | 404 os.makedirs(destination_directory) |
404 | 405 |
405 _log.info('Tests will be imported into: %s', destination_directory) | 406 _log.info('Tests will be imported into: %s', destination_directory) |
OLD | NEW |