| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 # one unique value per class. | 80 # one unique value per class. |
| 81 | 81 |
| 82 # FIXME: We should probably rename this to something like 'implementation_na
me'. | 82 # FIXME: We should probably rename this to something like 'implementation_na
me'. |
| 83 port_name = None | 83 port_name = None |
| 84 | 84 |
| 85 # Test names resemble unix relative paths, and use '/' as a directory separa
tor. | 85 # Test names resemble unix relative paths, and use '/' as a directory separa
tor. |
| 86 TEST_PATH_SEPARATOR = '/' | 86 TEST_PATH_SEPARATOR = '/' |
| 87 | 87 |
| 88 ALL_BUILD_TYPES = ('debug', 'release') | 88 ALL_BUILD_TYPES = ('debug', 'release') |
| 89 | 89 |
| 90 CONTENT_SHELL_NAME = 'content_shell' | 90 SKY_SHELL_NAME = 'sky_shell' |
| 91 MOJO_SHELL_NAME = 'mojo_shell' | |
| 92 | 91 |
| 93 # True if the port as aac and mp3 codecs built in. | 92 # True if the port as aac and mp3 codecs built in. |
| 94 PORT_HAS_AUDIO_CODECS_BUILT_IN = False | 93 PORT_HAS_AUDIO_CODECS_BUILT_IN = False |
| 95 | 94 |
| 96 ALL_SYSTEMS = ( | 95 ALL_SYSTEMS = ( |
| 97 ('snowleopard', 'x86'), | 96 ('snowleopard', 'x86'), |
| 98 ('lion', 'x86'), | 97 ('lion', 'x86'), |
| 99 | 98 |
| 100 # FIXME: We treat Retina (High-DPI) devices as if they are running | 99 # FIXME: We treat Retina (High-DPI) devices as if they are running |
| 101 # a different operating system version. This isn't accurate, but will wo
rk until | 100 # a different operating system version. This isn't accurate, but will wo
rk until |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 215 |
| 217 if not hasattr(options, 'configuration') or not options.configuration: | 216 if not hasattr(options, 'configuration') or not options.configuration: |
| 218 self.set_option_default('configuration', self.default_configuration(
)) | 217 self.set_option_default('configuration', self.default_configuration(
)) |
| 219 self._test_configuration = None | 218 self._test_configuration = None |
| 220 self._reftest_list = {} | 219 self._reftest_list = {} |
| 221 self._results_directory = None | 220 self._results_directory = None |
| 222 | 221 |
| 223 def buildbot_archives_baselines(self): | 222 def buildbot_archives_baselines(self): |
| 224 return True | 223 return True |
| 225 | 224 |
| 226 def additional_drt_flag(self): | |
| 227 driver_name = self.driver_name() | |
| 228 if driver_name == self.CONTENT_SHELL_NAME: | |
| 229 return ['--dump-render-tree'] | |
| 230 if driver_name == self.MOJO_SHELL_NAME: | |
| 231 return [ | |
| 232 # TODO(ianh): Remove text/sky once we remove .sky files | |
| 233 '--args-for=mojo:native_viewport_service --use-headless-config -
-use-osmesa', | |
| 234 '--args-for=mojo:sky_viewer --testing', | |
| 235 '--content-handlers=text/sky,mojo:sky_viewer,application/dart,mo
jo:sky_viewer', | |
| 236 '--url-mappings=mojo:window_manager=mojo:sky_tester,mojo:surface
s_service=mojo:fake_surfaces_service', | |
| 237 'mojo:window_manager', | |
| 238 ] | |
| 239 return [] | |
| 240 | |
| 241 def supports_per_test_timeout(self): | 225 def supports_per_test_timeout(self): |
| 242 return False | 226 return False |
| 243 | 227 |
| 244 def default_pixel_tests(self): | 228 def default_pixel_tests(self): |
| 245 return False | 229 return False |
| 246 | 230 |
| 247 def default_smoke_test_only(self): | 231 def default_smoke_test_only(self): |
| 248 return False | 232 return False |
| 249 | 233 |
| 250 def default_timeout_ms(self): | 234 def default_timeout_ms(self): |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 # the diff. Relevant Python issue: http://bugs.python.org/issue2142 | 501 # the diff. Relevant Python issue: http://bugs.python.org/issue2142 |
| 518 def diff_fixup(diff): | 502 def diff_fixup(diff): |
| 519 for line in diff: | 503 for line in diff: |
| 520 yield line | 504 yield line |
| 521 if not line.endswith('\n'): | 505 if not line.endswith('\n'): |
| 522 yield '\n\ No newline at end of file\n' | 506 yield '\n\ No newline at end of file\n' |
| 523 | 507 |
| 524 return ''.join(diff_fixup(diff)) | 508 return ''.join(diff_fixup(diff)) |
| 525 | 509 |
| 526 def driver_name(self): | 510 def driver_name(self): |
| 527 if self.get_option('driver_name'): | 511 return self.SKY_SHELL_NAME |
| 528 return self.get_option('driver_name') | |
| 529 return self.MOJO_SHELL_NAME | |
| 530 | 512 |
| 531 def expected_baselines_by_extension(self, test_name): | 513 def expected_baselines_by_extension(self, test_name): |
| 532 """Returns a dict mapping baseline suffix to relative path for each base
line in | 514 """Returns a dict mapping baseline suffix to relative path for each base
line in |
| 533 a test. For reftests, it returns ".==" or ".!=" instead of the suffix.""
" | 515 a test. For reftests, it returns ".==" or ".!=" instead of the suffix.""
" |
| 534 # FIXME: The name similarity between this and expected_baselines() below
, is unfortunate. | 516 # FIXME: The name similarity between this and expected_baselines() below
, is unfortunate. |
| 535 # We should probably rename them both. | 517 # We should probably rename them both. |
| 536 baseline_dict = {} | 518 baseline_dict = {} |
| 537 reference_files = self.reference_files(test_name) | 519 reference_files = self.reference_files(test_name) |
| 538 if reference_files: | 520 if reference_files: |
| 539 # FIXME: How should this handle more than one type of reftest? | 521 # FIXME: How should this handle more than one type of reftest? |
| (...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1767 | 1749 |
| 1768 class PhysicalTestSuite(object): | 1750 class PhysicalTestSuite(object): |
| 1769 def __init__(self, base, args): | 1751 def __init__(self, base, args): |
| 1770 self.name = base | 1752 self.name = base |
| 1771 self.base = base | 1753 self.base = base |
| 1772 self.args = args | 1754 self.args = args |
| 1773 self.tests = set() | 1755 self.tests = set() |
| 1774 | 1756 |
| 1775 def __repr__(self): | 1757 def __repr__(self): |
| 1776 return "PhysicalTestSuite('%s', '%s', %s)" % (self.name, self.base, self
.args) | 1758 return "PhysicalTestSuite('%s', '%s', %s)" % (self.name, self.base, self
.args) |
| OLD | NEW |