| 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 FALLBACK_PATHS = { | 381 FALLBACK_PATHS = { |
| 382 'win7': ['test-win-win7', 'test-win-win10'], | 382 'win7': ['test-win-win7', 'test-win-win10'], |
| 383 'win10': ['test-win-win10'], | 383 'win10': ['test-win-win10'], |
| 384 'mac10.10': ['test-mac-mac10.10', 'test-mac-mac10.11'], | 384 'mac10.10': ['test-mac-mac10.10', 'test-mac-mac10.11'], |
| 385 'mac10.11': ['test-mac-mac10.11'], | 385 'mac10.11': ['test-mac-mac10.11'], |
| 386 'trusty': ['test-linux-trusty', 'test-win-win7'], | 386 'trusty': ['test-linux-trusty', 'test-win-win7'], |
| 387 'precise': ['test-linux-precise', 'test-linux-trusty', 'test-win-win7'], | 387 'precise': ['test-linux-precise', 'test-linux-trusty', 'test-win-win7'], |
| 388 'linux32': ['test-linux-x86', 'test-linux-precise', 'test-linux-trusty',
'test-win-win7'], | 388 'linux32': ['test-linux-x86', 'test-linux-precise', 'test-linux-trusty',
'test-win-win7'], |
| 389 } | 389 } |
| 390 | 390 |
| 391 _all_systems = (('mac10.10', 'x86'), |
| 392 ('mac10.11', 'x86'), |
| 393 ('win7', 'x86'), |
| 394 ('win10', 'x86'), |
| 395 ('linux32', 'x86'), |
| 396 ('precise', 'x86_64'), |
| 397 ('trusty', 'x86_64')) |
| 398 |
| 399 _all_build_types = ('debug', 'release') |
| 400 |
| 401 """To avoid surprises when introducing new macros, these are intentionally f
ixed in time.""" |
| 402 _configuration_specifier_macros = { |
| 403 'mac': ['mac10.10', 'mac10.11'], |
| 404 'win': ['win7', 'win10'], |
| 405 'linux': ['linux32', 'precise', 'trusty'] |
| 406 } |
| 407 |
| 391 @classmethod | 408 @classmethod |
| 392 def determine_full_port_name(cls, host, options, port_name): | 409 def determine_full_port_name(cls, host, options, port_name): |
| 393 if port_name == 'test': | 410 if port_name == 'test': |
| 394 return TestPort.default_port_name | 411 return TestPort.default_port_name |
| 395 return port_name | 412 return port_name |
| 396 | 413 |
| 397 def __init__(self, host, port_name=None, **kwargs): | 414 def __init__(self, host, port_name=None, **kwargs): |
| 398 Port.__init__(self, host, port_name or TestPort.default_port_name, **kwa
rgs) | 415 Port.__init__(self, host, port_name or TestPort.default_port_name, **kwa
rgs) |
| 399 self._tests = unit_test_list() | 416 self._tests = unit_test_list() |
| 400 self._flakes = set() | 417 self._flakes = set() |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 return self._filesystem.join(self.layout_tests_dir(), 'http', 'conf', 'h
ttpd.conf') | 538 return self._filesystem.join(self.layout_tests_dir(), 'http', 'conf', 'h
ttpd.conf') |
| 522 | 539 |
| 523 def path_to_generic_test_expectations_file(self): | 540 def path_to_generic_test_expectations_file(self): |
| 524 return self._generic_expectations_path | 541 return self._generic_expectations_path |
| 525 | 542 |
| 526 def all_test_configurations(self): | 543 def all_test_configurations(self): |
| 527 """Returns a sequence of the TestConfigurations the port supports.""" | 544 """Returns a sequence of the TestConfigurations the port supports.""" |
| 528 # By default, we assume we want to test every graphics type in | 545 # By default, we assume we want to test every graphics type in |
| 529 # every configuration on every system. | 546 # every configuration on every system. |
| 530 test_configurations = [] | 547 test_configurations = [] |
| 531 for version, architecture in self._all_systems(): | 548 for version, architecture in self._all_systems: |
| 532 for build_type in self._all_build_types(): | 549 for build_type in self._all_build_types: |
| 533 test_configurations.append(TestConfiguration( | 550 test_configurations.append(TestConfiguration( |
| 534 version=version, | 551 version=version, |
| 535 architecture=architecture, | 552 architecture=architecture, |
| 536 build_type=build_type)) | 553 build_type=build_type)) |
| 537 return test_configurations | 554 return test_configurations |
| 538 | 555 |
| 539 def _all_systems(self): | |
| 540 return (('mac10.10', 'x86'), | |
| 541 ('mac10.11', 'x86'), | |
| 542 ('win7', 'x86'), | |
| 543 ('win10', 'x86'), | |
| 544 ('linux32', 'x86'), | |
| 545 ('precise', 'x86_64'), | |
| 546 ('trusty', 'x86_64')) | |
| 547 | |
| 548 def _all_build_types(self): | |
| 549 return ('debug', 'release') | |
| 550 | |
| 551 def configuration_specifier_macros(self): | 556 def configuration_specifier_macros(self): |
| 552 """To avoid surprises when introducing new macros, these are intentional
ly fixed in time.""" | 557 return self._configuration_specifier_macros |
| 553 return { | |
| 554 'mac': ['mac10.10', 'mac10.11'], | |
| 555 'win': ['win7', 'win10'], | |
| 556 'linux': ['linux32', 'precise', 'trusty'] | |
| 557 } | |
| 558 | 558 |
| 559 def virtual_test_suites(self): | 559 def virtual_test_suites(self): |
| 560 return [ | 560 return [ |
| 561 VirtualTestSuite(prefix='virtual_passes', base='passes', args=['--vi
rtual-arg']), | 561 VirtualTestSuite(prefix='virtual_passes', base='passes', args=['--vi
rtual-arg']), |
| 562 VirtualTestSuite(prefix='skipped', base='failures/expected', args=['
--virtual-arg2']), | 562 VirtualTestSuite(prefix='skipped', base='failures/expected', args=['
--virtual-arg2']), |
| 563 VirtualTestSuite(prefix='references_use_default_args', base='passes/
reftest.html', | 563 VirtualTestSuite(prefix='references_use_default_args', base='passes/
reftest.html', |
| 564 args=['--virtual-arg'], references_use_default_args
=True), | 564 args=['--virtual-arg'], references_use_default_args
=True), |
| 565 ] | 565 ] |
| 566 | 566 |
| 567 | 567 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 else: | 656 else: |
| 657 image = test.actual_image | 657 image = test.actual_image |
| 658 return DriverOutput(actual_text, image, test.actual_checksum, audio, | 658 return DriverOutput(actual_text, image, test.actual_checksum, audio, |
| 659 crash=(crash or web_process_crash), crashed_process_
name=crashed_process_name, | 659 crash=(crash or web_process_crash), crashed_process_
name=crashed_process_name, |
| 660 crashed_pid=crashed_pid, crash_log=crash_log, | 660 crashed_pid=crashed_pid, crash_log=crash_log, |
| 661 test_time=time.time() - start_time, timeout=test.tim
eout, error=test.error, pid=self.pid, | 661 test_time=time.time() - start_time, timeout=test.tim
eout, error=test.error, pid=self.pid, |
| 662 leak=test.leak) | 662 leak=test.leak) |
| 663 | 663 |
| 664 def stop(self): | 664 def stop(self): |
| 665 self.started = False | 665 self.started = False |
| OLD | NEW |