Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py

Issue 1158323009: Revert of Add an additional content_shell per worker for running virtual tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@virtual_reference_flags
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/test.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 self.assertEqual(results["num_flaky"], 0) 770 self.assertEqual(results["num_flaky"], 0)
771 771
772 def test_reftest_crash(self): 772 def test_reftest_crash(self):
773 test_results = get_test_results(['failures/unexpected/crash-reftest.html ']) 773 test_results = get_test_results(['failures/unexpected/crash-reftest.html '])
774 # The list of references should be empty since the test crashed and we d idn't run any references. 774 # The list of references should be empty since the test crashed and we d idn't run any references.
775 self.assertEqual(test_results[0].references, []) 775 self.assertEqual(test_results[0].references, [])
776 776
777 def test_reftest_with_virtual_reference(self): 777 def test_reftest_with_virtual_reference(self):
778 _, err, _ = logging_run(['--details', 'virtual/virtual_passes/passes/ref test.html'], tests_included=True) 778 _, err, _ = logging_run(['--details', 'virtual/virtual_passes/passes/ref test.html'], tests_included=True)
779 self.assertTrue('ref: virtual/virtual_passes/passes/reftest-expected.htm l' in err.getvalue()) 779 self.assertTrue('ref: virtual/virtual_passes/passes/reftest-expected.htm l' in err.getvalue())
780 self.assertTrue(
781 re.search('args: --virtual-arg\s*reference_args: --virtual-arg\s*ref :', err.getvalue()))
782
783 def test_reftest_virtual_references_use_default_args(self):
784 test_name = 'virtual/references_use_default_args/passes/reftest.html'
785 run_details, err, _ = logging_run(['--details', test_name], tests_includ ed=True)
786 self.assertEqual(run_details.exit_code, 0)
787 self.assertEqual(run_details.initial_results.total, 1)
788 test_result = run_details.initial_results.all_results[0]
789 self.assertEqual(test_result.test_name, test_name)
790 self.assertEqual(test_result.references[0], 'passes/reftest-expected.htm l')
791 # reference_args should be empty since we are using the default flags.
792 self.assertTrue(re.search('reference_args:\s*ref:', err.getvalue()))
793 780
794 def test_additional_platform_directory(self): 781 def test_additional_platform_directory(self):
795 self.assertTrue(passing_run(['--additional-platform-directory', '/tmp/fo o'])) 782 self.assertTrue(passing_run(['--additional-platform-directory', '/tmp/fo o']))
796 self.assertTrue(passing_run(['--additional-platform-directory', '/tmp/.. /foo'])) 783 self.assertTrue(passing_run(['--additional-platform-directory', '/tmp/.. /foo']))
797 self.assertTrue(passing_run(['--additional-platform-directory', '/tmp/fo o', '--additional-platform-directory', '/tmp/bar'])) 784 self.assertTrue(passing_run(['--additional-platform-directory', '/tmp/fo o', '--additional-platform-directory', '/tmp/bar']))
798 self.assertTrue(passing_run(['--additional-platform-directory', 'foo'])) 785 self.assertTrue(passing_run(['--additional-platform-directory', 'foo']))
799 786
800 def test_additional_expectations(self): 787 def test_additional_expectations(self):
801 host = MockHost() 788 host = MockHost()
802 host.filesystem.write_text_file('/tmp/overrides.txt', 'Bug(x) failures/u nexpected/mismatch.html [ ImageOnlyFailure ]\n') 789 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
1064 stderr = StringIO.StringIO() 1051 stderr = StringIO.StringIO()
1065 res = run_webkit_tests.main(['--platform', 'test', '--exit-after-n-failu res', '1', 1052 res = run_webkit_tests.main(['--platform', 'test', '--exit-after-n-failu res', '1',
1066 'failures/unexpected/missing_text.html', 1053 'failures/unexpected/missing_text.html',
1067 'failures/unexpected/missing_image.html'], 1054 'failures/unexpected/missing_image.html'],
1068 stdout, stderr) 1055 stdout, stderr)
1069 self.assertEqual(res, test_run_results.EARLY_EXIT_STATUS) 1056 self.assertEqual(res, test_run_results.EARLY_EXIT_STATUS)
1070 self.assertEqual(stdout.getvalue(), 1057 self.assertEqual(stdout.getvalue(),
1071 ('\n' 1058 ('\n'
1072 'Regressions: Unexpected missing results (1)\n' 1059 'Regressions: Unexpected missing results (1)\n'
1073 ' failures/unexpected/missing_image.html [ Missing ]\n\n')) 1060 ' failures/unexpected/missing_image.html [ Missing ]\n\n'))
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698