| 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 | 96 |
| 97 def __contains__(self, item): | 97 def __contains__(self, item): |
| 98 return item in self.tests | 98 return item in self.tests |
| 99 | 99 |
| 100 def __getitem__(self, item): | 100 def __getitem__(self, item): |
| 101 return self.tests[item] | 101 return self.tests[item] |
| 102 | 102 |
| 103 # | 103 # |
| 104 # These numbers may need to be updated whenever we add or delete tests. This inc
ludes virtual tests. | 104 # These numbers may need to be updated whenever we add or delete tests. This inc
ludes virtual tests. |
| 105 # | 105 # |
| 106 TOTAL_TESTS = 114 | 106 TOTAL_TESTS = 106 |
| 107 TOTAL_SKIPS = 26 | 107 TOTAL_SKIPS = 22 |
| 108 TOTAL_CRASHES = 80 | 108 TOTAL_CRASHES = 76 |
| 109 UNEXPECTED_PASSES = 1 | 109 UNEXPECTED_PASSES = 1 |
| 110 UNEXPECTED_FAILURES = 26 | 110 UNEXPECTED_FAILURES = 26 |
| 111 | 111 |
| 112 | 112 |
| 113 def unit_test_list(): | 113 def unit_test_list(): |
| 114 tests = TestList() | 114 tests = TestList() |
| 115 tests.add('failures/expected/crash.html', crash=True) | 115 tests.add('failures/expected/crash.html', crash=True) |
| 116 tests.add('failures/expected/exception.html', exception=True) | 116 tests.add('failures/expected/exception.html', exception=True) |
| 117 tests.add('failures/expected/device_failure.html', device_failure=True) | 117 tests.add('failures/expected/device_failure.html', device_failure=True) |
| 118 tests.add('failures/expected/timeout.html', timeout=True) | 118 tests.add('failures/expected/timeout.html', timeout=True) |
| 119 tests.add('failures/expected/leak.html', leak=True) | 119 tests.add('failures/expected/leak.html', leak=True) |
| 120 tests.add('failures/expected/missing_text.html', expected_text=None) | |
| 121 tests.add('failures/expected/needsrebaseline.html', actual_text='needsrebase
line text') | 120 tests.add('failures/expected/needsrebaseline.html', actual_text='needsrebase
line text') |
| 122 tests.add('failures/expected/needsmanualrebaseline.html', actual_text='needs
manualrebaseline text') | 121 tests.add('failures/expected/needsmanualrebaseline.html', actual_text='needs
manualrebaseline text') |
| 123 tests.add('failures/expected/image.html', | 122 tests.add('failures/expected/image.html', |
| 124 actual_image='image_fail-pngtEXtchecksum\x00checksum_fail', | 123 actual_image='image_fail-pngtEXtchecksum\x00checksum_fail', |
| 125 expected_image='image-pngtEXtchecksum\x00checksum-png') | 124 expected_image='image-pngtEXtchecksum\x00checksum-png') |
| 126 tests.add('failures/expected/image_checksum.html', | 125 tests.add('failures/expected/image_checksum.html', |
| 127 actual_checksum='image_checksum_fail-checksum', | 126 actual_checksum='image_checksum_fail-checksum', |
| 128 actual_image='image_checksum_fail-png') | 127 actual_image='image_checksum_fail-png') |
| 129 tests.add('failures/expected/audio.html', | 128 tests.add('failures/expected/audio.html', |
| 130 actual_audio=base64.b64encode('audio_fail-wav'), expected_audio='a
udio-wav', | 129 actual_audio=base64.b64encode('audio_fail-wav'), expected_audio='a
udio-wav', |
| 131 actual_text=None, expected_text=None, | 130 actual_text=None, expected_text=None, |
| 132 actual_image=None, expected_image=None, | 131 actual_image=None, expected_image=None, |
| 133 actual_checksum=None) | 132 actual_checksum=None) |
| 134 tests.add('failures/expected/keyboard.html', keyboard=True) | 133 tests.add('failures/expected/keyboard.html', keyboard=True) |
| 135 tests.add('failures/expected/missing_check.html', | |
| 136 expected_image='missing_check-png') | |
| 137 tests.add('failures/expected/missing_image.html', expected_image=None) | |
| 138 tests.add('failures/expected/missing_audio.html', expected_audio=None, | |
| 139 actual_text=None, expected_text=None, | |
| 140 actual_image=None, expected_image=None, | |
| 141 actual_checksum=None) | |
| 142 tests.add('failures/expected/missing_text.html', expected_text=None) | |
| 143 tests.add('failures/expected/newlines_leading.html', | 134 tests.add('failures/expected/newlines_leading.html', |
| 144 expected_text="\nfoo\n", actual_text="foo\n") | 135 expected_text="\nfoo\n", actual_text="foo\n") |
| 145 tests.add('failures/expected/newlines_trailing.html', | 136 tests.add('failures/expected/newlines_trailing.html', |
| 146 expected_text="foo\n\n", actual_text="foo\n") | 137 expected_text="foo\n\n", actual_text="foo\n") |
| 147 tests.add('failures/expected/newlines_with_excess_CR.html', | 138 tests.add('failures/expected/newlines_with_excess_CR.html', |
| 148 expected_text="foo\r\r\r\n", actual_text="foo\n") | 139 expected_text="foo\r\r\r\n", actual_text="foo\n") |
| 149 tests.add('failures/expected/text.html', actual_text='text_fail-png') | 140 tests.add('failures/expected/text.html', actual_text='text_fail-png') |
| 150 tests.add('failures/expected/crash_then_text.html') | 141 tests.add('failures/expected/crash_then_text.html') |
| 151 tests.add('failures/expected/skip_text.html', actual_text='text diff') | 142 tests.add('failures/expected/skip_text.html', actual_text='text diff') |
| 152 tests.add('failures/flaky/text.html') | 143 tests.add('failures/flaky/text.html') |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 if not filesystem.exists('/mock-checkout/LayoutTests/TestExpectations'): | 277 if not filesystem.exists('/mock-checkout/LayoutTests/TestExpectations'): |
| 287 filesystem.write_text_file('/mock-checkout/LayoutTests/TestExpectations'
, """ | 278 filesystem.write_text_file('/mock-checkout/LayoutTests/TestExpectations'
, """ |
| 288 Bug(test) failures/expected/crash.html [ Crash ] | 279 Bug(test) failures/expected/crash.html [ Crash ] |
| 289 Bug(test) failures/expected/crash_then_text.html [ Failure ] | 280 Bug(test) failures/expected/crash_then_text.html [ Failure ] |
| 290 Bug(test) failures/expected/image.html [ Failure ] | 281 Bug(test) failures/expected/image.html [ Failure ] |
| 291 Bug(test) failures/expected/needsrebaseline.html [ NeedsRebaseline ] | 282 Bug(test) failures/expected/needsrebaseline.html [ NeedsRebaseline ] |
| 292 Bug(test) failures/expected/needsmanualrebaseline.html [ NeedsManualRebaseline ] | 283 Bug(test) failures/expected/needsmanualrebaseline.html [ NeedsManualRebaseline ] |
| 293 Bug(test) failures/expected/audio.html [ Failure ] | 284 Bug(test) failures/expected/audio.html [ Failure ] |
| 294 Bug(test) failures/expected/image_checksum.html [ Failure ] | 285 Bug(test) failures/expected/image_checksum.html [ Failure ] |
| 295 Bug(test) failures/expected/mismatch.html [ Failure ] | 286 Bug(test) failures/expected/mismatch.html [ Failure ] |
| 296 Bug(test) failures/expected/missing_check.html [ Missing Pass ] | |
| 297 Bug(test) failures/expected/missing_image.html [ Missing Pass ] | |
| 298 Bug(test) failures/expected/missing_audio.html [ Missing Pass ] | |
| 299 Bug(test) failures/expected/missing_text.html [ Missing Pass ] | |
| 300 Bug(test) failures/expected/newlines_leading.html [ Failure ] | 287 Bug(test) failures/expected/newlines_leading.html [ Failure ] |
| 301 Bug(test) failures/expected/newlines_trailing.html [ Failure ] | 288 Bug(test) failures/expected/newlines_trailing.html [ Failure ] |
| 302 Bug(test) failures/expected/newlines_with_excess_CR.html [ Failure ] | 289 Bug(test) failures/expected/newlines_with_excess_CR.html [ Failure ] |
| 303 Bug(test) failures/expected/reftest.html [ Failure ] | 290 Bug(test) failures/expected/reftest.html [ Failure ] |
| 304 Bug(test) failures/expected/text.html [ Failure ] | 291 Bug(test) failures/expected/text.html [ Failure ] |
| 305 Bug(test) failures/expected/timeout.html [ Timeout ] | 292 Bug(test) failures/expected/timeout.html [ Timeout ] |
| 306 Bug(test) failures/expected/keyboard.html [ Crash ] | 293 Bug(test) failures/expected/keyboard.html [ Crash ] |
| 307 Bug(test) failures/expected/exception.html [ Crash ] | 294 Bug(test) failures/expected/exception.html [ Crash ] |
| 308 Bug(test) failures/expected/device_failure.html [ Crash ] | 295 Bug(test) failures/expected/device_failure.html [ Crash ] |
| 309 Bug(test) failures/expected/leak.html [ Leak ] | 296 Bug(test) failures/expected/leak.html [ Leak ] |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 else: | 628 else: |
| 642 image = test.actual_image | 629 image = test.actual_image |
| 643 return DriverOutput(actual_text, image, test.actual_checksum, audio, | 630 return DriverOutput(actual_text, image, test.actual_checksum, audio, |
| 644 crash=(crash or web_process_crash), crashed_process_
name=crashed_process_name, | 631 crash=(crash or web_process_crash), crashed_process_
name=crashed_process_name, |
| 645 crashed_pid=crashed_pid, crash_log=crash_log, | 632 crashed_pid=crashed_pid, crash_log=crash_log, |
| 646 test_time=time.time() - start_time, timeout=test.tim
eout, error=test.error, pid=self.pid, | 633 test_time=time.time() - start_time, timeout=test.tim
eout, error=test.error, pid=self.pid, |
| 647 leak=test.leak) | 634 leak=test.leak) |
| 648 | 635 |
| 649 def stop(self): | 636 def stop(self): |
| 650 self.started = False | 637 self.started = False |
| OLD | NEW |