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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 ('lion', 'x86'), | 96 ('lion', 'x86'), |
97 | 97 |
98 # FIXME: We treat Retina (High-DPI) devices as if they are running | 98 # FIXME: We treat Retina (High-DPI) devices as if they are running |
99 # a different operating system version. This isn't accurate, but will wo
rk until | 99 # a different operating system version. This isn't accurate, but will wo
rk until |
100 # we need to test and support baselines across multiple O/S versions. | 100 # we need to test and support baselines across multiple O/S versions. |
101 ('retina', 'x86'), | 101 ('retina', 'x86'), |
102 | 102 |
103 ('mountainlion', 'x86'), | 103 ('mountainlion', 'x86'), |
104 ('mavericks', 'x86'), | 104 ('mavericks', 'x86'), |
105 ('mac10.10', 'x86'), | 105 ('mac10.10', 'x86'), |
106 ('xp', 'x86'), | |
107 ('win7', 'x86'), | 106 ('win7', 'x86'), |
108 ('win10', 'x86'), | 107 ('win10', 'x86'), |
109 # FIXME: We handle 32bit Linux similarly to Mac retina above treating it | 108 # FIXME: We handle 32bit Linux similarly to Mac retina above treating it |
110 # as a different system for now. | 109 # as a different system for now. |
111 ('linux32', 'x86'), | 110 ('linux32', 'x86'), |
112 ('precise', 'x86_64'), | 111 ('precise', 'x86_64'), |
113 ('trusty', 'x86_64'), | 112 ('trusty', 'x86_64'), |
114 # FIXME: Technically this should be 'arm', but adding a third architectu
re type breaks TestConfigurationConverter. | 113 # FIXME: Technically this should be 'arm', but adding a third architectu
re type breaks TestConfigurationConverter. |
115 # If we need this to be 'arm' in the future, then we first have to fix T
estConfigurationConverter. | 114 # If we need this to be 'arm' in the future, then we first have to fix T
estConfigurationConverter. |
116 ('icecreamsandwich', 'x86'), | 115 ('icecreamsandwich', 'x86'), |
117 ) | 116 ) |
118 | 117 |
119 ALL_BASELINE_VARIANTS = [ | |
120 'mac-mac10.10', 'mac-mavericks', 'mac-retina', 'mac-mountainlion', 'mac-
lion', 'mac-snowleopard', | |
121 'win-win10', 'win-win7', 'win-xp' | |
122 'linux-trusty', 'linux-precise', 'linux-x86', | |
123 ] | |
124 | |
125 CONFIGURATION_SPECIFIER_MACROS = { | 118 CONFIGURATION_SPECIFIER_MACROS = { |
126 'mac': ['snowleopard', 'lion', 'mountainlion', 'retina', 'mavericks', 'm
ac10.10'], | 119 'mac': ['snowleopard', 'lion', 'mountainlion', 'retina', 'mavericks', 'm
ac10.10'], |
127 'win': ['xp', 'win7', 'win10'], | 120 'win': ['win7', 'win10'], |
128 'linux': ['linux32', 'precise', 'trusty'], | 121 'linux': ['linux32', 'precise', 'trusty'], |
129 'android': ['icecreamsandwich'], | 122 'android': ['icecreamsandwich'], |
130 } | 123 } |
131 | 124 |
132 DEFAULT_BUILD_DIRECTORIES = ('out',) | 125 DEFAULT_BUILD_DIRECTORIES = ('out',) |
133 | 126 |
134 # overridden in subclasses. | 127 # overridden in subclasses. |
135 FALLBACK_PATHS = {} | 128 FALLBACK_PATHS = {} |
136 | 129 |
137 SUPPORTED_VERSIONS = [] | 130 SUPPORTED_VERSIONS = [] |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 self._pretty_patch_path = self.path_from_webkit_base("Tools", "Scripts",
"webkitruby", "PrettyPatch", "prettify.rb") | 212 self._pretty_patch_path = self.path_from_webkit_base("Tools", "Scripts",
"webkitruby", "PrettyPatch", "prettify.rb") |
220 self._pretty_patch_available = None | 213 self._pretty_patch_available = None |
221 | 214 |
222 if not hasattr(options, 'configuration') or not options.configuration: | 215 if not hasattr(options, 'configuration') or not options.configuration: |
223 self.set_option_default('configuration', self.default_configuration(
)) | 216 self.set_option_default('configuration', self.default_configuration(
)) |
224 self._test_configuration = None | 217 self._test_configuration = None |
225 self._reftest_list = {} | 218 self._reftest_list = {} |
226 self._results_directory = None | 219 self._results_directory = None |
227 self._virtual_test_suites = None | 220 self._virtual_test_suites = None |
228 | 221 |
| 222 def __str__(self): |
| 223 return "Port{name=%s, version=%s, architecture=%s, test_configuration=%s
}" % (self._name, self._version, self._architecture, self._test_configuration) |
| 224 |
229 def buildbot_archives_baselines(self): | 225 def buildbot_archives_baselines(self): |
230 return True | 226 return True |
231 | 227 |
232 def additional_driver_flag(self): | 228 def additional_driver_flag(self): |
233 if self.driver_name() == self.CONTENT_SHELL_NAME: | 229 if self.driver_name() == self.CONTENT_SHELL_NAME: |
234 return ['--run-layout-test'] | 230 return ['--run-layout-test'] |
235 return [] | 231 return [] |
236 | 232 |
237 def supports_per_test_timeout(self): | 233 def supports_per_test_timeout(self): |
238 return False | 234 return False |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 (e.g., "mac-snowleopard" or "linux-trusty" and can be passed | 973 (e.g., "mac-snowleopard" or "linux-trusty" and can be passed |
978 to factory.get() to instantiate the port.""" | 974 to factory.get() to instantiate the port.""" |
979 return self._name | 975 return self._name |
980 | 976 |
981 def operating_system(self): | 977 def operating_system(self): |
982 # Subclasses should override this default implementation. | 978 # Subclasses should override this default implementation. |
983 return 'mac' | 979 return 'mac' |
984 | 980 |
985 def version(self): | 981 def version(self): |
986 """Returns a string indicating the version of a given platform, e.g. | 982 """Returns a string indicating the version of a given platform, e.g. |
987 'leopard' or 'xp'. | 983 'leopard' or 'win7'. |
988 | 984 |
989 This is used to help identify the exact port when parsing test | 985 This is used to help identify the exact port when parsing test |
990 expectations, determining search paths, and logging information.""" | 986 expectations, determining search paths, and logging information.""" |
991 return self._version | 987 return self._version |
992 | 988 |
993 def architecture(self): | 989 def architecture(self): |
994 return self._architecture | 990 return self._architecture |
995 | 991 |
996 def get_option(self, name, default_value=None): | 992 def get_option(self, name, default_value=None): |
997 return getattr(self._options, name, default_value) | 993 return getattr(self._options, name, default_value) |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 def all_test_configurations(self): | 1249 def all_test_configurations(self): |
1254 """Returns a list of TestConfiguration instances, representing all avail
able | 1250 """Returns a list of TestConfiguration instances, representing all avail
able |
1255 test configurations for this port.""" | 1251 test configurations for this port.""" |
1256 return self._generate_all_test_configurations() | 1252 return self._generate_all_test_configurations() |
1257 | 1253 |
1258 # FIXME: Belongs on a Platform object. | 1254 # FIXME: Belongs on a Platform object. |
1259 def configuration_specifier_macros(self): | 1255 def configuration_specifier_macros(self): |
1260 """Ports may provide a way to abbreviate configuration specifiers to con
veniently | 1256 """Ports may provide a way to abbreviate configuration specifiers to con
veniently |
1261 refer to them as one term or alias specific values to more generic ones.
For example: | 1257 refer to them as one term or alias specific values to more generic ones.
For example: |
1262 | 1258 |
1263 (xp, vista, win7) -> win # Abbreviate all Windows versions into one name
sake. | 1259 (vista, win7) -> win # Abbreviate all Windows versions into one namesake
. |
1264 (precise, trusty) -> linux # Change specific name of Linux distro to a
more generic term. | 1260 (precise, trusty) -> linux # Change specific name of Linux distro to a
more generic term. |
1265 | 1261 |
1266 Returns a dictionary, each key representing a macro term ('win', for exa
mple), | 1262 Returns a dictionary, each key representing a macro term ('win', for exa
mple), |
1267 and value being a list of valid configuration specifiers (such as ['xp',
'vista', 'win7']).""" | 1263 and value being a list of valid configuration specifiers (such as ['vist
a', 'win7']).""" |
1268 return self.CONFIGURATION_SPECIFIER_MACROS | 1264 return self.CONFIGURATION_SPECIFIER_MACROS |
1269 | 1265 |
1270 def all_baseline_variants(self): | |
1271 """Returns a list of platform names sufficient to cover all the baseline
s. | |
1272 | |
1273 The list should be sorted so that a later platform will reuse | |
1274 an earlier platform's baselines if they are the same (e.g., | |
1275 'mac10.10' should precede 'mac10.9').""" | |
1276 return self.ALL_BASELINE_VARIANTS | |
1277 | |
1278 def _generate_all_test_configurations(self): | 1266 def _generate_all_test_configurations(self): |
1279 """Returns a sequence of the TestConfigurations the port supports.""" | 1267 """Returns a sequence of the TestConfigurations the port supports.""" |
1280 # By default, we assume we want to test every graphics type in | 1268 # By default, we assume we want to test every graphics type in |
1281 # every configuration on every system. | 1269 # every configuration on every system. |
1282 test_configurations = [] | 1270 test_configurations = [] |
1283 for version, architecture in self.ALL_SYSTEMS: | 1271 for version, architecture in self.ALL_SYSTEMS: |
1284 for build_type in self.ALL_BUILD_TYPES: | 1272 for build_type in self.ALL_BUILD_TYPES: |
1285 test_configurations.append(TestConfiguration(version, architectu
re, build_type)) | 1273 test_configurations.append(TestConfiguration(version, architectu
re, build_type)) |
1286 return test_configurations | 1274 return test_configurations |
1287 | 1275 |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1797 class PhysicalTestSuite(object): | 1785 class PhysicalTestSuite(object): |
1798 def __init__(self, base, args, reference_args=None): | 1786 def __init__(self, base, args, reference_args=None): |
1799 self.name = base | 1787 self.name = base |
1800 self.base = base | 1788 self.base = base |
1801 self.args = args | 1789 self.args = args |
1802 self.reference_args = args if reference_args is None else reference_args | 1790 self.reference_args = args if reference_args is None else reference_args |
1803 self.tests = set() | 1791 self.tests = set() |
1804 | 1792 |
1805 def __repr__(self): | 1793 def __repr__(self): |
1806 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) | 1794 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) |
OLD | NEW |