OLD | NEW |
1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze
ged | 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze
ged |
3 # Copyright (C) 2011 Apple Inc. All rights reserved. | 3 # Copyright (C) 2011 Apple Inc. All rights reserved. |
4 # | 4 # |
5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
7 # met: | 7 # met: |
8 # | 8 # |
9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 247 |
248 def test_child_processes_2(self): | 248 def test_child_processes_2(self): |
249 if self.should_test_processes: | 249 if self.should_test_processes: |
250 _, regular_output, _ = logging_run( | 250 _, regular_output, _ = logging_run( |
251 ['--debug-rwt-logging', '--child-processes', '2'], shared_port=F
alse) | 251 ['--debug-rwt-logging', '--child-processes', '2'], shared_port=F
alse) |
252 self.assertTrue(any(['Running 2 ' in line for line in regular_output
.buflist])) | 252 self.assertTrue(any(['Running 2 ' in line for line in regular_output
.buflist])) |
253 | 253 |
254 def test_child_processes_min(self): | 254 def test_child_processes_min(self): |
255 if self.should_test_processes: | 255 if self.should_test_processes: |
256 _, regular_output, _ = logging_run( | 256 _, regular_output, _ = logging_run( |
257 ['--debug-rwt-logging', '--child-processes', '2', '-i', 'passes/
passes', 'passes'], | 257 ['--debug-rwt-logging', '--child-processes', '2', '-i', 'passes/
virtual_passes', 'passes'], |
258 tests_included=True, shared_port=False) | 258 tests_included=True, shared_port=False) |
259 self.assertTrue(any(['Running 1 ' in line for line in regular_output
.buflist])) | 259 self.assertTrue(any(['Running 1 ' in line for line in regular_output
.buflist])) |
260 | 260 |
261 def test_dryrun(self): | 261 def test_dryrun(self): |
262 tests_run = get_tests_run(['--dry-run']) | 262 tests_run = get_tests_run(['--dry-run']) |
263 self.assertEqual(tests_run, []) | 263 self.assertEqual(tests_run, []) |
264 | 264 |
265 tests_run = get_tests_run(['-n']) | 265 tests_run = get_tests_run(['-n']) |
266 self.assertEqual(tests_run, []) | 266 self.assertEqual(tests_run, []) |
267 | 267 |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 host = MockHost() | 724 host = MockHost() |
725 details, err, _ = logging_run(['--debug-rwt-logging', '--retry-failures'
, 'failures/unexpected/text-image-checksum.html'], tests_included=True, host=hos
t) | 725 details, err, _ = logging_run(['--debug-rwt-logging', '--retry-failures'
, 'failures/unexpected/text-image-checksum.html'], tests_included=True, host=hos
t) |
726 self.assertEqual(details.exit_code, 1) | 726 self.assertEqual(details.exit_code, 1) |
727 self.assertTrue(host.filesystem.exists('/tmp/layout-test-results/failure
s/unexpected/text-image-checksum-actual.txt')) | 727 self.assertTrue(host.filesystem.exists('/tmp/layout-test-results/failure
s/unexpected/text-image-checksum-actual.txt')) |
728 self.assertTrue(host.filesystem.exists('/tmp/layout-test-results/retries
/failures/unexpected/text-image-checksum-actual.txt')) | 728 self.assertTrue(host.filesystem.exists('/tmp/layout-test-results/retries
/failures/unexpected/text-image-checksum-actual.txt')) |
729 | 729 |
730 def test_run_order__inline(self): | 730 def test_run_order__inline(self): |
731 # These next tests test that we run the tests in ascending alphabetical | 731 # These next tests test that we run the tests in ascending alphabetical |
732 # order per directory. HTTP tests are sharded separately from other test
s, | 732 # order per directory. HTTP tests are sharded separately from other test
s, |
733 # so we have to test both. | 733 # so we have to test both. |
734 tests_run = get_tests_run(['-i', 'passes/passes', 'passes']) | 734 tests_run = get_tests_run(['-i', 'passes/virtual_passes', 'passes']) |
735 self.assertEqual(tests_run, sorted(tests_run)) | 735 self.assertEqual(tests_run, sorted(tests_run)) |
736 | 736 |
737 tests_run = get_tests_run(['http/tests/passes']) | 737 tests_run = get_tests_run(['http/tests/passes']) |
738 self.assertEqual(tests_run, sorted(tests_run)) | 738 self.assertEqual(tests_run, sorted(tests_run)) |
739 | 739 |
740 def test_virtual(self): | 740 def test_virtual(self): |
741 self.assertTrue(passing_run(['passes/text.html', 'passes/args.html', | 741 self.assertTrue(passing_run(['passes/text.html', 'passes/args.html', |
742 'virtual/passes/text.html', 'virtual/passes
/args.html'])) | 742 'virtual/passes/text.html', 'virtual/passes
/args.html'])) |
743 | 743 |
744 def test_reftest_run(self): | 744 def test_reftest_run(self): |
(...skipping 24 matching lines...) Expand all Loading... |
769 self.assertEqual(results["tests"]["reftests"]["foo"]["unlistedtest.html"
]["actual"], "MISSING"), | 769 self.assertEqual(results["tests"]["reftests"]["foo"]["unlistedtest.html"
]["actual"], "MISSING"), |
770 self.assertEqual(results["num_regressions"], 5) | 770 self.assertEqual(results["num_regressions"], 5) |
771 self.assertEqual(results["num_flaky"], 0) | 771 self.assertEqual(results["num_flaky"], 0) |
772 | 772 |
773 def test_reftest_crash(self): | 773 def test_reftest_crash(self): |
774 test_results = get_test_results(['failures/unexpected/crash-reftest.html
']) | 774 test_results = get_test_results(['failures/unexpected/crash-reftest.html
']) |
775 # The list of references should be empty since the test crashed and we d
idn't run any references. | 775 # The list of references should be empty since the test crashed and we d
idn't run any references. |
776 self.assertEqual(test_results[0].references, []) | 776 self.assertEqual(test_results[0].references, []) |
777 | 777 |
778 def test_reftest_with_virtual_reference(self): | 778 def test_reftest_with_virtual_reference(self): |
779 _, err, _ = logging_run(['--details', 'virtual/passes/reftest.html'], te
sts_included=True) | 779 _, err, _ = logging_run(['--details', 'virtual/virtual_passes/passes/ref
test.html'], tests_included=True) |
780 self.assertTrue('ref: virtual/passes/reftest-expected.html' in err.getva
lue()) | 780 self.assertTrue('ref: virtual/virtual_passes/passes/reftest-expected.htm
l' in err.getvalue()) |
781 | 781 |
782 def test_additional_platform_directory(self): | 782 def test_additional_platform_directory(self): |
783 self.assertTrue(passing_run(['--additional-platform-directory', '/tmp/fo
o'])) | 783 self.assertTrue(passing_run(['--additional-platform-directory', '/tmp/fo
o'])) |
784 self.assertTrue(passing_run(['--additional-platform-directory', '/tmp/..
/foo'])) | 784 self.assertTrue(passing_run(['--additional-platform-directory', '/tmp/..
/foo'])) |
785 self.assertTrue(passing_run(['--additional-platform-directory', '/tmp/fo
o', '--additional-platform-directory', '/tmp/bar'])) | 785 self.assertTrue(passing_run(['--additional-platform-directory', '/tmp/fo
o', '--additional-platform-directory', '/tmp/bar'])) |
786 self.assertTrue(passing_run(['--additional-platform-directory', 'foo'])) | 786 self.assertTrue(passing_run(['--additional-platform-directory', 'foo'])) |
787 | 787 |
788 def test_additional_expectations(self): | 788 def test_additional_expectations(self): |
789 host = MockHost() | 789 host = MockHost() |
790 host.filesystem.write_text_file('/tmp/overrides.txt', 'Bug(x) failures/u
nexpected/mismatch.html [ ImageOnlyFailure ]\n') | 790 host.filesystem.write_text_file('/tmp/overrides.txt', 'Bug(x) failures/u
nexpected/mismatch.html [ ImageOnlyFailure ]\n') |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 stderr = StringIO.StringIO() | 1052 stderr = StringIO.StringIO() |
1053 res = run_webkit_tests.main(['--platform', 'test', '--exit-after-n-failu
res', '1', | 1053 res = run_webkit_tests.main(['--platform', 'test', '--exit-after-n-failu
res', '1', |
1054 'failures/unexpected/missing_text.html', | 1054 'failures/unexpected/missing_text.html', |
1055 'failures/unexpected/missing_image.html'], | 1055 'failures/unexpected/missing_image.html'], |
1056 stdout, stderr) | 1056 stdout, stderr) |
1057 self.assertEqual(res, test_run_results.EARLY_EXIT_STATUS) | 1057 self.assertEqual(res, test_run_results.EARLY_EXIT_STATUS) |
1058 self.assertEqual(stdout.getvalue(), | 1058 self.assertEqual(stdout.getvalue(), |
1059 ('\n' | 1059 ('\n' |
1060 'Regressions: Unexpected missing results (1)\n' | 1060 'Regressions: Unexpected missing results (1)\n' |
1061 ' failures/unexpected/missing_image.html [ Missing ]\n\n')) | 1061 ' failures/unexpected/missing_image.html [ Missing ]\n\n')) |
OLD | NEW |