| OLD | NEW |
| 1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. 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 are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| 11 # in the documentation and/or other materials provided with the | 11 # in the documentation and/or other materials provided with the |
| 12 # distribution. | 12 # distribution. |
| 13 # * Neither the name of Google Inc. nor the names of its | 13 # * Neither the name of Google Inc. nor the names of its |
| 14 # contributors may be used to endorse or promote products derived from | 14 # contributors may be used to endorse or promote products derived from |
| 15 # this software without specific prior written permission. | 15 # this software without specific prior written permission. |
| 16 # | 16 # |
| 17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 18 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 18 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 19 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 19 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 20 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 20 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 21 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 21 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | |
| 29 """Chromium Mac implementation of the Port interface.""" | 28 """Chromium Mac implementation of the Port interface.""" |
| 30 | 29 |
| 31 import logging | 30 import logging |
| 32 import signal | 31 import signal |
| 33 | 32 |
| 34 from webkitpy.layout_tests.port import base | 33 from webkitpy.layout_tests.port import base |
| 35 | 34 |
| 36 | |
| 37 _log = logging.getLogger(__name__) | 35 _log = logging.getLogger(__name__) |
| 38 | 36 |
| 39 | 37 |
| 40 class MacPort(base.Port): | 38 class MacPort(base.Port): |
| 41 SUPPORTED_VERSIONS = ('mac10.9', 'mac10.10', 'mac10.11', 'retina') | 39 SUPPORTED_VERSIONS = ('mac10.9', 'mac10.10', 'mac10.11', 'retina') |
| 42 port_name = 'mac' | 40 port_name = 'mac' |
| 43 | 41 |
| 44 # FIXME: We treat Retina (High-DPI) devices as if they are running | 42 # FIXME: We treat Retina (High-DPI) devices as if they are running |
| 45 # a different operating system version. This is lame and should be fixed. | 43 # a different operating system version. This is lame and should be fixed. |
| 46 # Note that the retina versions fallback to the non-retina versions and so n
o | 44 # Note that the retina versions fallback to the non-retina versions and so n
o |
| 47 # baselines are shared between retina versions; this keeps the fallback grap
h as a tree | 45 # baselines are shared between retina versions; this keeps the fallback grap
h as a tree |
| 48 # and maximizes the number of baselines we can share that way. | 46 # and maximizes the number of baselines we can share that way. |
| 49 # We also currently only support Retina on 10.11. | 47 # We also currently only support Retina on 10.11. |
| 50 | 48 |
| 51 FALLBACK_PATHS = {} | 49 FALLBACK_PATHS = {} |
| 52 FALLBACK_PATHS['mac10.11'] = ['mac'] | 50 FALLBACK_PATHS['mac10.11'] = ['mac'] |
| 53 FALLBACK_PATHS['mac10.10'] = ['mac-mac10.10'] + FALLBACK_PATHS['mac10.11'] | 51 FALLBACK_PATHS['mac10.10'] = ['mac-mac10.10'] + FALLBACK_PATHS['mac10.11'] |
| 54 FALLBACK_PATHS['mac10.9'] = ['mac-mac10.9'] + FALLBACK_PATHS['mac10.10'] | 52 FALLBACK_PATHS['mac10.9'] = ['mac-mac10.9'] + FALLBACK_PATHS['mac10.10'] |
| 55 FALLBACK_PATHS['retina'] = ['mac-retina', 'mac'] | 53 FALLBACK_PATHS['retina'] = ['mac-retina', 'mac'] |
| 56 | 54 |
| 57 DEFAULT_BUILD_DIRECTORIES = ('xcodebuild', 'out') | 55 DEFAULT_BUILD_DIRECTORIES = ('xcodebuild', 'out') |
| 58 | 56 |
| 59 CONTENT_SHELL_NAME = 'Content Shell' | 57 CONTENT_SHELL_NAME = 'Content Shell' |
| 60 | 58 |
| 61 BUILD_REQUIREMENTS_URL = 'https://chromium.googlesource.com/chromium/src/+/m
aster/docs/mac_build_instructions.md' | 59 BUILD_REQUIREMENTS_URL = 'https://chromium.googlesource.com/chromium/src/+/m
aster/docs/mac_build_instructions.md' |
| 62 | 60 |
| 63 @classmethod | 61 @classmethod |
| 64 def determine_full_port_name(cls, host, options, port_name): | 62 def determine_full_port_name(cls, host, options, port_name): |
| 65 if port_name.endswith('mac'): | 63 if port_name.endswith('mac'): |
| 66 if host.platform.os_version in ('future',): | 64 if host.platform.os_version in ('future', ): |
| 67 version = 'mac10.11' | 65 version = 'mac10.11' |
| 68 else: | 66 else: |
| 69 version = host.platform.os_version | 67 version = host.platform.os_version |
| 70 if host.platform.is_highdpi(): | 68 if host.platform.is_highdpi(): |
| 71 version = 'retina' | 69 version = 'retina' |
| 72 return port_name + '-' + version | 70 return port_name + '-' + version |
| 73 return port_name | 71 return port_name |
| 74 | 72 |
| 75 def __init__(self, host, port_name, **kwargs): | 73 def __init__(self, host, port_name, **kwargs): |
| 76 super(MacPort, self).__init__(host, port_name, **kwargs) | 74 super(MacPort, self).__init__(host, port_name, **kwargs) |
| (...skipping 28 matching lines...) Expand all Loading... |
| 105 | 103 |
| 106 def _path_to_driver(self, target=None): | 104 def _path_to_driver(self, target=None): |
| 107 return self._build_path_with_target(target, self.driver_name() + '.app',
'Contents', 'MacOS', self.driver_name()) | 105 return self._build_path_with_target(target, self.driver_name() + '.app',
'Contents', 'MacOS', self.driver_name()) |
| 108 | 106 |
| 109 def _path_to_helper(self): | 107 def _path_to_helper(self): |
| 110 binary_name = 'layout_test_helper' | 108 binary_name = 'layout_test_helper' |
| 111 return self._build_path(binary_name) | 109 return self._build_path(binary_name) |
| 112 | 110 |
| 113 def _path_to_wdiff(self): | 111 def _path_to_wdiff(self): |
| 114 return 'wdiff' | 112 return 'wdiff' |
| OLD | NEW |