| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 from webkitpy.layout_tests.port import base | 43 from webkitpy.layout_tests.port import base |
| 44 from webkitpy.layout_tests.servers import crash_service | 44 from webkitpy.layout_tests.servers import crash_service |
| 45 | 45 |
| 46 | 46 |
| 47 _log = logging.getLogger(__name__) | 47 _log = logging.getLogger(__name__) |
| 48 | 48 |
| 49 | 49 |
| 50 class WinPort(base.Port): | 50 class WinPort(base.Port): |
| 51 port_name = 'win' | 51 port_name = 'win' |
| 52 | 52 |
| 53 SUPPORTED_VERSIONS = ('xp', 'win7', 'win8', 'win10') | 53 SUPPORTED_VERSIONS = ('xp', 'win7', 'win10') |
| 54 | 54 |
| 55 FALLBACK_PATHS = {'win10': ['win']} | 55 FALLBACK_PATHS = {'win10': ['win']} |
| 56 FALLBACK_PATHS['win8'] = ['win8'] + FALLBACK_PATHS['win10'] | 56 FALLBACK_PATHS['win7'] = ['win7'] + FALLBACK_PATHS['win10'] |
| 57 FALLBACK_PATHS['win7'] = ['win7'] + FALLBACK_PATHS['win8'] | |
| 58 FALLBACK_PATHS['xp'] = ['win-xp'] + FALLBACK_PATHS['win7'] | 57 FALLBACK_PATHS['xp'] = ['win-xp'] + FALLBACK_PATHS['win7'] |
| 59 | 58 |
| 60 DEFAULT_BUILD_DIRECTORIES = ('build', 'out') | 59 DEFAULT_BUILD_DIRECTORIES = ('build', 'out') |
| 61 | 60 |
| 62 BUILD_REQUIREMENTS_URL = 'http://www.chromium.org/developers/how-tos/build-i
nstructions-windows' | 61 BUILD_REQUIREMENTS_URL = 'http://www.chromium.org/developers/how-tos/build-i
nstructions-windows' |
| 63 | 62 |
| 64 @classmethod | 63 @classmethod |
| 65 def determine_full_port_name(cls, host, options, port_name): | 64 def determine_full_port_name(cls, host, options, port_name): |
| 66 if port_name.endswith('win'): | 65 if port_name.endswith('win'): |
| 67 assert host.platform.is_win() | 66 assert host.platform.is_win() |
| 68 # We don't maintain separate baselines for vista, so we pretend it i
s win7. | 67 # We don't maintain separate baselines for vista, so we pretend it i
s win7. |
| 69 if host.platform.os_version in ('vista', '7sp0', '7sp1'): | 68 if host.platform.os_version in ('vista', '7sp0', '7sp1'): |
| 70 version = 'win7' | 69 version = 'win7' |
| 71 elif host.platform.os_version in ('8', '8.1'): | 70 # Same for win8, we treat it as win10. |
| 72 version = 'win8' | 71 elif host.platform.os_version in ('8', '8.1', '10', 'future'): |
| 73 elif host.platform.os_version in ('10', 'future'): | |
| 74 version = 'win10' | 72 version = 'win10' |
| 75 else: | 73 else: |
| 76 version = host.platform.os_version | 74 version = host.platform.os_version |
| 77 port_name = port_name + '-' + version | 75 port_name = port_name + '-' + version |
| 78 return port_name | 76 return port_name |
| 79 | 77 |
| 80 def __init__(self, host, port_name, **kwargs): | 78 def __init__(self, host, port_name, **kwargs): |
| 81 super(WinPort, self).__init__(host, port_name, **kwargs) | 79 super(WinPort, self).__init__(host, port_name, **kwargs) |
| 82 self._version = port_name[port_name.index('win-') + len('win-'):] | 80 self._version = port_name[port_name.index('win-') + len('win-'):] |
| 83 assert self._version in self.SUPPORTED_VERSIONS, "%s is not in %s" % (se
lf._version, self.SUPPORTED_VERSIONS) | 81 assert self._version in self.SUPPORTED_VERSIONS, "%s is not in %s" % (se
lf._version, self.SUPPORTED_VERSIONS) |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 return result | 242 return result |
| 245 | 243 |
| 246 def look_for_new_crash_logs(self, crashed_processes, start_time): | 244 def look_for_new_crash_logs(self, crashed_processes, start_time): |
| 247 if self.get_option('disable_breakpad'): | 245 if self.get_option('disable_breakpad'): |
| 248 return None | 246 return None |
| 249 return self._dump_reader.look_for_new_crash_logs(crashed_processes, star
t_time) | 247 return self._dump_reader.look_for_new_crash_logs(crashed_processes, star
t_time) |
| 250 | 248 |
| 251 def clobber_old_port_specific_results(self): | 249 def clobber_old_port_specific_results(self): |
| 252 if not self.get_option('disable_breakpad'): | 250 if not self.get_option('disable_breakpad'): |
| 253 self._dump_reader.clobber_old_results() | 251 self._dump_reader.clobber_old_results() |
| OLD | NEW |