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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 | 202 |
203 # Text output files contain "\r\n" on Windows. This may be | 203 # Text output files contain "\r\n" on Windows. This may be |
204 # helpfully filtered to "\r\r\n" by our Python/Cygwin tooling. | 204 # helpfully filtered to "\r\r\n" by our Python/Cygwin tooling. |
205 tests.add('passes/text.html', | 205 tests.add('passes/text.html', |
206 expected_text='\nfoo\n\n', actual_text='\nfoo\r\n\r\r\n') | 206 expected_text='\nfoo\n\n', actual_text='\nfoo\r\n\r\r\n') |
207 | 207 |
208 # For reftests. | 208 # For reftests. |
209 tests.add_reftest('passes/reftest.html', 'passes/reftest-expected.html', sam
e_image=True) | 209 tests.add_reftest('passes/reftest.html', 'passes/reftest-expected.html', sam
e_image=True) |
210 | 210 |
211 # This adds a different virtual reference to ensure that that also works. | 211 # This adds a different virtual reference to ensure that that also works. |
212 tests.add('virtual/passes/reftest-expected.html', actual_checksum='xxx', act
ual_image='XXX', is_reftest=True) | 212 tests.add('virtual/virtual_passes/passes/reftest-expected.html', actual_chec
ksum='xxx', actual_image='XXX', is_reftest=True) |
213 | 213 |
214 tests.add_reftest('passes/mismatch.html', 'passes/mismatch-expected-mismatch
.html', same_image=False) | 214 tests.add_reftest('passes/mismatch.html', 'passes/mismatch-expected-mismatch
.html', same_image=False) |
215 tests.add_reftest('passes/svgreftest.svg', 'passes/svgreftest-expected.svg',
same_image=True) | 215 tests.add_reftest('passes/svgreftest.svg', 'passes/svgreftest-expected.svg',
same_image=True) |
216 tests.add_reftest('passes/xhtreftest.xht', 'passes/xhtreftest-expected.html'
, same_image=True) | 216 tests.add_reftest('passes/xhtreftest.xht', 'passes/xhtreftest-expected.html'
, same_image=True) |
217 tests.add_reftest('passes/phpreftest.php', 'passes/phpreftest-expected-misma
tch.svg', same_image=False) | 217 tests.add_reftest('passes/phpreftest.php', 'passes/phpreftest-expected-misma
tch.svg', same_image=False) |
218 tests.add_reftest('failures/expected/reftest.html', 'failures/expected/refte
st-expected.html', same_image=False) | 218 tests.add_reftest('failures/expected/reftest.html', 'failures/expected/refte
st-expected.html', same_image=False) |
219 tests.add_reftest('failures/expected/mismatch.html', 'failures/expected/mism
atch-expected-mismatch.html', same_image=True) | 219 tests.add_reftest('failures/expected/mismatch.html', 'failures/expected/mism
atch-expected-mismatch.html', same_image=True) |
220 tests.add_reftest('failures/unexpected/crash-reftest.html', 'failures/unexpe
cted/crash-reftest-expected.html', same_image=True, crash=True) | 220 tests.add_reftest('failures/unexpected/crash-reftest.html', 'failures/unexpe
cted/crash-reftest-expected.html', same_image=True, crash=True) |
221 tests.add_reftest('failures/unexpected/reftest.html', 'failures/unexpected/r
eftest-expected.html', same_image=False) | 221 tests.add_reftest('failures/unexpected/reftest.html', 'failures/unexpected/r
eftest-expected.html', same_image=False) |
222 tests.add_reftest('failures/unexpected/mismatch.html', 'failures/unexpected/
mismatch-expected-mismatch.html', same_image=True) | 222 tests.add_reftest('failures/unexpected/mismatch.html', 'failures/unexpected/
mismatch-expected-mismatch.html', same_image=True) |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 tests.add('failures/unexpected/pixeldir/image_in_pixeldir.html', | 255 tests.add('failures/unexpected/pixeldir/image_in_pixeldir.html', |
256 actual_image='image_in_pixeldir-pngtEXtchecksum\x00checksum_fail', | 256 actual_image='image_in_pixeldir-pngtEXtchecksum\x00checksum_fail', |
257 expected_image='image_in_pixeldir-pngtEXtchecksum\x00checksum-png') | 257 expected_image='image_in_pixeldir-pngtEXtchecksum\x00checksum-png') |
258 tests.add('failures/unexpected/image_not_in_pixeldir.html', | 258 tests.add('failures/unexpected/image_not_in_pixeldir.html', |
259 actual_image='image_not_in_pixeldir-pngtEXtchecksum\x00checksum_fail', | 259 actual_image='image_not_in_pixeldir-pngtEXtchecksum\x00checksum_fail', |
260 expected_image='image_not_in_pixeldir-pngtEXtchecksum\x00checksum-png') | 260 expected_image='image_not_in_pixeldir-pngtEXtchecksum\x00checksum-png') |
261 | 261 |
262 # For testing that virtual test suites don't expand names containing themsel
ves | 262 # For testing that virtual test suites don't expand names containing themsel
ves |
263 # See webkit.org/b/97925 and base_unittest.PortTest.test_tests(). | 263 # See webkit.org/b/97925 and base_unittest.PortTest.test_tests(). |
264 tests.add('passes/test-virtual-passes.html') | 264 tests.add('passes/test-virtual-passes.html') |
265 tests.add('passes/passes/test-virtual-passes.html') | 265 tests.add('passes/virtual_passes/test-virtual-passes.html') |
266 | 266 |
267 return tests | 267 return tests |
268 | 268 |
269 | 269 |
270 # Here we use a non-standard location for the layout tests, to ensure that | 270 # Here we use a non-standard location for the layout tests, to ensure that |
271 # this works. The path contains a '.' in the name because we've seen bugs | 271 # this works. The path contains a '.' in the name because we've seen bugs |
272 # related to this before. | 272 # related to this before. |
273 | 273 |
274 LAYOUT_TEST_DIR = '/test.checkout/LayoutTests' | 274 LAYOUT_TEST_DIR = '/test.checkout/LayoutTests' |
275 PERF_TEST_DIR = '/test.checkout/PerformanceTests' | 275 PERF_TEST_DIR = '/test.checkout/PerformanceTests' |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 for test in test_list.tests.values(): | 346 for test in test_list.tests.values(): |
347 add_file(test, test.name[test.name.rfind('.'):], '') | 347 add_file(test, test.name[test.name.rfind('.'):], '') |
348 if test.is_reftest: | 348 if test.is_reftest: |
349 continue | 349 continue |
350 if test.actual_audio: | 350 if test.actual_audio: |
351 add_file(test, '-expected.wav', test.expected_audio) | 351 add_file(test, '-expected.wav', test.expected_audio) |
352 continue | 352 continue |
353 add_file(test, '-expected.txt', test.expected_text) | 353 add_file(test, '-expected.txt', test.expected_text) |
354 add_file(test, '-expected.png', test.expected_image) | 354 add_file(test, '-expected.png', test.expected_image) |
355 | 355 |
356 filesystem.write_text_file(filesystem.join(LAYOUT_TEST_DIR, 'virtual', 'pass
es', 'args-expected.txt'), 'args-txt --virtual-arg') | 356 filesystem.write_text_file(filesystem.join(LAYOUT_TEST_DIR, 'virtual', 'virt
ual_passes', 'passes', 'args-expected.txt'), 'args-txt --virtual-arg') |
357 # Clear the list of written files so that we can watch what happens during t
esting. | 357 # Clear the list of written files so that we can watch what happens during t
esting. |
358 filesystem.clear_written_files() | 358 filesystem.clear_written_files() |
359 | 359 |
360 | 360 |
361 class TestPort(Port): | 361 class TestPort(Port): |
362 port_name = 'test' | 362 port_name = 'test' |
363 default_port_name = 'test-mac-leopard' | 363 default_port_name = 'test-mac-leopard' |
364 | 364 |
365 """Test implementation of the Port interface.""" | 365 """Test implementation of the Port interface.""" |
366 ALL_BASELINE_VARIANTS = ( | 366 ALL_BASELINE_VARIANTS = ( |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 | 458 |
459 def perf_tests_dir(self): | 459 def perf_tests_dir(self): |
460 return PERF_TEST_DIR | 460 return PERF_TEST_DIR |
461 | 461 |
462 def webkit_base(self): | 462 def webkit_base(self): |
463 return '/test.checkout' | 463 return '/test.checkout' |
464 | 464 |
465 def _skipped_tests_for_unsupported_features(self, test_list): | 465 def _skipped_tests_for_unsupported_features(self, test_list): |
466 return set(['failures/expected/skip_text.html', | 466 return set(['failures/expected/skip_text.html', |
467 'failures/unexpected/skip_pass.html', | 467 'failures/unexpected/skip_pass.html', |
468 'virtual/skipped']) | 468 'virtual/skipped/failures/expected']) |
469 | 469 |
470 def name(self): | 470 def name(self): |
471 return self._name | 471 return self._name |
472 | 472 |
473 def operating_system(self): | 473 def operating_system(self): |
474 return self._operating_system | 474 return self._operating_system |
475 | 475 |
476 def _path_to_wdiff(self): | 476 def _path_to_wdiff(self): |
477 return None | 477 return None |
478 | 478 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 | 541 |
542 def configuration_specifier_macros(self): | 542 def configuration_specifier_macros(self): |
543 """To avoid surprises when introducing new macros, these are intentional
ly fixed in time.""" | 543 """To avoid surprises when introducing new macros, these are intentional
ly fixed in time.""" |
544 return {'mac': ['leopard', 'snowleopard'], 'win': ['xp', 'win7'], 'linux
': ['lucid']} | 544 return {'mac': ['leopard', 'snowleopard'], 'win': ['xp', 'win7'], 'linux
': ['lucid']} |
545 | 545 |
546 def all_baseline_variants(self): | 546 def all_baseline_variants(self): |
547 return self.ALL_BASELINE_VARIANTS | 547 return self.ALL_BASELINE_VARIANTS |
548 | 548 |
549 def virtual_test_suites(self): | 549 def virtual_test_suites(self): |
550 return [ | 550 return [ |
551 VirtualTestSuite(name='passes', base='passes', args=['--virtual-arg'
]), | 551 VirtualTestSuite(prefix='virtual_passes', base='passes', args=['--vi
rtual-arg']), |
552 VirtualTestSuite(name='skipped', base='failures/expected', args=['--
virtual-arg2']), | 552 VirtualTestSuite(prefix='skipped', base='failures/expected', args=['
--virtual-arg2']), |
553 ] | 553 ] |
554 | 554 |
555 | 555 |
556 class TestDriver(Driver): | 556 class TestDriver(Driver): |
557 """Test/Dummy implementation of the driver interface.""" | 557 """Test/Dummy implementation of the driver interface.""" |
558 next_pid = 1 | 558 next_pid = 1 |
559 | 559 |
560 def __init__(self, *args, **kwargs): | 560 def __init__(self, *args, **kwargs): |
561 super(TestDriver, self).__init__(*args, **kwargs) | 561 super(TestDriver, self).__init__(*args, **kwargs) |
562 self.started = False | 562 self.started = False |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 else: | 637 else: |
638 image = test.actual_image | 638 image = test.actual_image |
639 return DriverOutput(actual_text, image, test.actual_checksum, audio, | 639 return DriverOutput(actual_text, image, test.actual_checksum, audio, |
640 crash=(crash or web_process_crash), crashed_process_name=crashed_pro
cess_name, | 640 crash=(crash or web_process_crash), crashed_process_name=crashed_pro
cess_name, |
641 crashed_pid=crashed_pid, crash_log=crash_log, | 641 crashed_pid=crashed_pid, crash_log=crash_log, |
642 test_time=time.time() - start_time, timeout=test.timeout, error=test
.error, pid=self.pid, | 642 test_time=time.time() - start_time, timeout=test.timeout, error=test
.error, pid=self.pid, |
643 leak=test.leak) | 643 leak=test.leak) |
644 | 644 |
645 def stop(self): | 645 def stop(self): |
646 self.started = False | 646 self.started = False |
OLD | NEW |