Chromium Code Reviews| 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 |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 import logging | 31 import logging |
| 32 import signal | 32 import signal |
| 33 | 33 |
| 34 from webkitpy.layout_tests.port import base | 34 from webkitpy.layout_tests.port import base |
| 35 | 35 |
| 36 | 36 |
| 37 _log = logging.getLogger(__name__) | 37 _log = logging.getLogger(__name__) |
| 38 | 38 |
| 39 | 39 |
| 40 class MacPort(base.Port): | 40 class MacPort(base.Port): |
| 41 SUPPORTED_VERSIONS = ('snowleopard', 'lion', 'retina', 'mountainlion', 'mave ricks') | 41 SUPPORTED_VERSIONS = ('snowleopard', 'lion', 'retina', 'mountainlion', 'mave ricks', 'yosemite') |
|
Dirk Pranke
2015/06/18 17:23:03
and here.
| |
| 42 port_name = 'mac' | 42 port_name = 'mac' |
| 43 | 43 |
| 44 # FIXME: We treat Retina (High-DPI) devices as if they are running | 44 # 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. | 45 # 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 | 46 # 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 | 47 # 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. | 48 # and maximizes the number of baselines we can share that way. |
| 49 # We also currently only support Retina on 10.9. | 49 # We also currently only support Retina on 10.9. |
| 50 | 50 |
| 51 FALLBACK_PATHS = {} | 51 FALLBACK_PATHS = {} |
| 52 FALLBACK_PATHS['mavericks'] = ['mac'] | 52 FALLBACK_PATHS['yosemite'] = ['mac'] |
| 53 FALLBACK_PATHS['mavericks'] = ['mac-mavericks'] + FALLBACK_PATHS['yosemite'] | |
| 53 FALLBACK_PATHS['retina'] = ['mac-retina'] + FALLBACK_PATHS['mavericks'] | 54 FALLBACK_PATHS['retina'] = ['mac-retina'] + FALLBACK_PATHS['mavericks'] |
| 54 FALLBACK_PATHS['mountainlion'] = ['mac-mountainlion'] + FALLBACK_PATHS['mave ricks'] | 55 FALLBACK_PATHS['mountainlion'] = ['mac-mountainlion'] + FALLBACK_PATHS['mave ricks'] |
| 55 FALLBACK_PATHS['lion'] = ['mac-lion'] + FALLBACK_PATHS['mountainlion'] | 56 FALLBACK_PATHS['lion'] = ['mac-lion'] + FALLBACK_PATHS['mountainlion'] |
| 56 FALLBACK_PATHS['snowleopard'] = ['mac-snowleopard'] + FALLBACK_PATHS['lion'] | 57 FALLBACK_PATHS['snowleopard'] = ['mac-snowleopard'] + FALLBACK_PATHS['lion'] |
| 57 | 58 |
| 58 DEFAULT_BUILD_DIRECTORIES = ('xcodebuild', 'out') | 59 DEFAULT_BUILD_DIRECTORIES = ('xcodebuild', 'out') |
| 59 | 60 |
| 60 CONTENT_SHELL_NAME = 'Content Shell' | 61 CONTENT_SHELL_NAME = 'Content Shell' |
| 61 | 62 |
| 62 BUILD_REQUIREMENTS_URL = 'https://code.google.com/p/chromium/wiki/MacBuildIn structions' | 63 BUILD_REQUIREMENTS_URL = 'https://code.google.com/p/chromium/wiki/MacBuildIn structions' |
| 63 | 64 |
| 64 @classmethod | 65 @classmethod |
| 65 def determine_full_port_name(cls, host, options, port_name): | 66 def determine_full_port_name(cls, host, options, port_name): |
| 66 if port_name.endswith('mac'): | 67 if port_name.endswith('mac'): |
| 67 if host.platform.os_version in ('future',): | 68 if host.platform.os_version in ('future',): |
| 68 version = 'mavericks' | 69 version = 'yosemite' |
| 69 else: | 70 else: |
| 70 version = host.platform.os_version | 71 version = host.platform.os_version |
| 71 if host.platform.is_highdpi(): | 72 if host.platform.is_highdpi(): |
| 72 version = 'retina' | 73 version = 'retina' |
| 73 return port_name + '-' + version | 74 return port_name + '-' + version |
| 74 return port_name | 75 return port_name |
| 75 | 76 |
| 76 def __init__(self, host, port_name, **kwargs): | 77 def __init__(self, host, port_name, **kwargs): |
| 77 super(MacPort, self).__init__(host, port_name, **kwargs) | 78 super(MacPort, self).__init__(host, port_name, **kwargs) |
| 78 self._version = port_name[port_name.index('mac-') + len('mac-'):] | 79 self._version = port_name[port_name.index('mac-') + len('mac-'):] |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 110 def _path_to_driver(self, configuration=None): | 111 def _path_to_driver(self, configuration=None): |
| 111 # FIXME: make |configuration| happy with case-sensitive file systems. | 112 # FIXME: make |configuration| happy with case-sensitive file systems. |
| 112 return self._build_path_with_configuration(configuration, self.driver_na me() + '.app', 'Contents', 'MacOS', self.driver_name()) | 113 return self._build_path_with_configuration(configuration, self.driver_na me() + '.app', 'Contents', 'MacOS', self.driver_name()) |
| 113 | 114 |
| 114 def _path_to_helper(self): | 115 def _path_to_helper(self): |
| 115 binary_name = 'layout_test_helper' | 116 binary_name = 'layout_test_helper' |
| 116 return self._build_path(binary_name) | 117 return self._build_path(binary_name) |
| 117 | 118 |
| 118 def _path_to_wdiff(self): | 119 def _path_to_wdiff(self): |
| 119 return 'wdiff' | 120 return 'wdiff' |
| OLD | NEW |