| 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 23 matching lines...) Expand all Loading... |
| 34 import logging | 34 import logging |
| 35 import mimetypes | 35 import mimetypes |
| 36 import os | 36 import os |
| 37 import re | 37 import re |
| 38 | 38 |
| 39 from webkitpy.common.webkit_finder import WebKitFinder | 39 from webkitpy.common.webkit_finder import WebKitFinder |
| 40 from webkitpy.layout_tests.models.test_expectations import TestExpectationParser | 40 from webkitpy.layout_tests.models.test_expectations import TestExpectationParser |
| 41 from webkitpy.w3c.test_parser import TestParser | 41 from webkitpy.w3c.test_parser import TestParser |
| 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 relative to the upstream repository base. |
| 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). If the absolute path to the |
| 47 MAX_PATH_LENGTH = 140 | 47 # destination directory is up to 100 characters on Windows, then that would |
| 48 # give us 160 characters from the base of the upstream repo. |
| 49 # See: http://crbug.com/609871. |
| 50 MAX_PATH_LENGTH = 160 |
| 48 | 51 |
| 49 _log = logging.getLogger(__name__) | 52 _log = logging.getLogger(__name__) |
| 50 | 53 |
| 51 | 54 |
| 52 class TestCopier(object): | 55 class TestCopier(object): |
| 53 | 56 |
| 54 def __init__(self, host, source_repo_path, dest_dir_name='external'): | 57 def __init__(self, host, source_repo_path, dest_dir_name='external'): |
| 55 """Initializes variables to prepare for copying and converting files. | 58 """Initializes variables to prepare for copying and converting files. |
| 56 | 59 |
| 57 Args: | 60 Args: |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 """Checks whether a source path is too long to import. | 365 """Checks whether a source path is too long to import. |
| 363 | 366 |
| 364 Args: | 367 Args: |
| 365 Absolute path of file to be imported. | 368 Absolute path of file to be imported. |
| 366 | 369 |
| 367 Returns: | 370 Returns: |
| 368 True if the path is too long to import, False if it's OK. | 371 True if the path is too long to import, False if it's OK. |
| 369 """ | 372 """ |
| 370 path_from_repo_base = os.path.relpath(source_path, self.source_repo_path
) | 373 path_from_repo_base = os.path.relpath(source_path, self.source_repo_path
) |
| 371 return len(path_from_repo_base) > MAX_PATH_LENGTH | 374 return len(path_from_repo_base) > MAX_PATH_LENGTH |
| OLD | NEW |