| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 from webkitpy.w3c.test_converter import convert_for_webkit | 42 from webkitpy.w3c.test_converter import convert_for_webkit |
| 43 | 43 |
| 44 # Maximum length of import path starting from top of source repository. | 44 # Maximum length of import path starting from top of source repository. |
| 45 # This limit is here because the Windows builders cannot create paths that are | 45 # This limit is here because the Windows builders cannot create paths that are |
| 46 # longer than the Windows max path length (260). See http://crbug.com/609871. | 46 # longer than the Windows max path length (260). See http://crbug.com/609871. |
| 47 MAX_PATH_LENGTH = 140 | 47 MAX_PATH_LENGTH = 140 |
| 48 | 48 |
| 49 _log = logging.getLogger(__name__) | 49 _log = logging.getLogger(__name__) |
| 50 | 50 |
| 51 | 51 |
| 52 class TestImporter(object): | 52 class TestCopier(object): |
| 53 | 53 |
| 54 def __init__(self, host, source_repo_path, dest_dir_name='external'): | 54 def __init__(self, host, source_repo_path, dest_dir_name='external'): |
| 55 """Initializes variables to prepare for copying and converting files. | 55 """Initializes variables to prepare for copying and converting files. |
| 56 | 56 |
| 57 Args: | 57 Args: |
| 58 source_repo_path: Path to the local checkout of a WPT | 58 source_repo_path: Path to the local checkout of a WPT |
| 59 """ | 59 """ |
| 60 self.host = host | 60 self.host = host |
| 61 | 61 |
| 62 assert self.host.filesystem.exists(source_repo_path) | 62 assert self.host.filesystem.exists(source_repo_path) |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 """Checks whether a source path is too long to import. | 347 """Checks whether a source path is too long to import. |
| 348 | 348 |
| 349 Args: | 349 Args: |
| 350 Absolute path of file to be imported. | 350 Absolute path of file to be imported. |
| 351 | 351 |
| 352 Returns: | 352 Returns: |
| 353 True if the path is too long to import, False if it's OK. | 353 True if the path is too long to import, False if it's OK. |
| 354 """ | 354 """ |
| 355 path_from_repo_base = os.path.relpath(source_path, self.source_repo_path
) | 355 path_from_repo_base = os.path.relpath(source_path, self.source_repo_path
) |
| 356 return len(path_from_repo_base) > MAX_PATH_LENGTH | 356 return len(path_from_repo_base) > MAX_PATH_LENGTH |
| OLD | NEW |