summaryrefslogtreecommitdiff
path: root/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-09-20 14:01:09 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-09-20 14:01:09 +0200
commit6dbcd09121fe266c7704a524b5cbd7f2754659c0 (patch)
tree5ae0d16cec0cc61f576d51c57b3a4613c7e91e22 /Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
parent6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2 (diff)
downloadqtwebkit-6dbcd09121fe266c7704a524b5cbd7f2754659c0.tar.gz
Imported WebKit commit 080af0beaa6f0ba8ff8f44cb8bd8b5dcf75ac0af (http://svn.webkit.org/repository/webkit/trunk@129119)
New snapshot with prospective build fix for incorrect QtWebKit master module header file creation
Diffstat (limited to 'Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py')
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py b/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
index cae01e813..22fb1704b 100644
--- a/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
@@ -67,8 +67,8 @@ class TestRebaseline(unittest.TestCase):
tool.filesystem.write_text_file(lion_port.path_from_chromium_base('skia', 'skia_test_expectations.txt'), '')
for path in lion_port.expectations_files():
tool.filesystem.write_text_file(path, '')
- tool.filesystem.write_text_file(lion_port.path_to_test_expectations_file(), """BUGB MAC LINUX XP DEBUG : fast/dom/Window/window-postmessage-clone-really-deep-array.html = PASS
-BUGA DEBUG : fast/css/large-list-of-rules-crash.html = TEXT
+ tool.filesystem.write_text_file(lion_port.path_to_test_expectations_file(), """Bug(B) [ Mac Linux XP Debug ] fast/dom/Window/window-postmessage-clone-really-deep-array.html [ Pass ]
+Bug(A) [ Debug ] : fast/css/large-list-of-rules-crash.html [ Failure ]
""")
tool.filesystem.write_text_file(os.path.join(lion_port.layout_tests_dir(), "fast/dom/Window/window-postmessage-clone-really-deep-array.html"), "Dummy test contents")
tool.filesystem.write_text_file(os.path.join(lion_port.layout_tests_dir(), "fast/css/large-list-of-rules-crash.html"), "Dummy test contents")
@@ -81,8 +81,8 @@ Retrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-resu
OutputCapture().assert_outputs(self, command._rebaseline_test_and_update_expectations, ["Webkit Mac10.7", "userscripts/another-test.html", None], expected_logs=expected_logs)
new_expectations = tool.filesystem.read_text_file(lion_port.path_to_test_expectations_file())
- self.assertEqual(new_expectations, """BUGB MAC LINUX XP DEBUG : fast/dom/Window/window-postmessage-clone-really-deep-array.html = PASS
-BUGA DEBUG : fast/css/large-list-of-rules-crash.html = TEXT
+ self.assertEqual(new_expectations, """Bug(B) [ Mac Linux XP Debug ] fast/dom/Window/window-postmessage-clone-really-deep-array.html [ Pass ]
+Bug(A) [ Debug ] : fast/css/large-list-of-rules-crash.html [ Failure ]
""")
def test_rebaseline_updates_expectations_file(self):
@@ -92,7 +92,7 @@ BUGA DEBUG : fast/css/large-list-of-rules-crash.html = TEXT
lion_port = tool.port_factory.get_from_builder_name("Webkit Mac10.7")
tool.filesystem.write_text_file(lion_port.path_from_chromium_base('skia', 'skia_test_expectations.txt'), '')
- tool.filesystem.write_text_file(lion_port.path_to_test_expectations_file(), "BUGX MAC : userscripts/another-test.html = IMAGE\nBUGZ LINUX : userscripts/another-test.html = IMAGE\n")
+ tool.filesystem.write_text_file(lion_port.path_to_test_expectations_file(), "Bug(x) [ Mac ] userscripts/another-test.html [ ImageOnlyFailure ]\nbug(z) [ Linux ] userscripts/another-test.html [ ImageOnlyFailure ]\n")
tool.filesystem.write_text_file(os.path.join(lion_port.layout_tests_dir(), "userscripts/another-test.html"), "Dummy test contents")
expected_logs = """Retrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-results/userscripts/another-test-actual.png.
@@ -102,7 +102,7 @@ Retrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-resu
OutputCapture().assert_outputs(self, command._rebaseline_test_and_update_expectations, ["Webkit Mac10.7", "userscripts/another-test.html", None], expected_logs=expected_logs)
new_expectations = tool.filesystem.read_text_file(lion_port.path_to_test_expectations_file())
- self.assertEqual(new_expectations, "BUGX SNOWLEOPARD : userscripts/another-test.html = IMAGE\nBUGZ LINUX : userscripts/another-test.html = IMAGE\n")
+ self.assertEqual(new_expectations, "Bug(x) [ SnowLeopard ] userscripts/another-test.html [ ImageOnlyFailure ]\nbug(z) [ Linux ] userscripts/another-test.html [ ImageOnlyFailure ]\n")
def test_rebaseline_does_not_include_overrides(self):
command = RebaselineTest()
@@ -111,8 +111,8 @@ Retrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-resu
lion_port = tool.port_factory.get_from_builder_name("Webkit Mac10.7")
tool.filesystem.write_text_file(lion_port.path_from_chromium_base('skia', 'skia_test_expectations.txt'), '')
- tool.filesystem.write_text_file(lion_port.path_to_test_expectations_file(), "BUGX MAC : userscripts/another-test.html = IMAGE\nBUGZ LINUX : userscripts/another-test.html = IMAGE\n")
- tool.filesystem.write_text_file(lion_port.path_from_chromium_base('skia', 'skia_test_expectations.txt'), "BUGY MAC : other-test.html = TEXT\n")
+ tool.filesystem.write_text_file(lion_port.path_to_test_expectations_file(), "Bug(x) [ Mac ] userscripts/another-test.html [ ImageOnlyFailure ]\nBug(z) [ Linux ] userscripts/another-test.html [ ImageOnlyFailure ]\n")
+ tool.filesystem.write_text_file(lion_port.path_from_chromium_base('skia', 'skia_test_expectations.txt'), "Bug(y) [ Mac ] other-test.html [ Failure ]\n")
tool.filesystem.write_text_file(os.path.join(lion_port.layout_tests_dir(), "userscripts/another-test.html"), "Dummy test contents")
expected_logs = """Retrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-results/userscripts/another-test-actual.png.
@@ -122,7 +122,7 @@ Retrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-resu
OutputCapture().assert_outputs(self, command._rebaseline_test_and_update_expectations, ["Webkit Mac10.7", "userscripts/another-test.html", None], expected_logs=expected_logs)
new_expectations = tool.filesystem.read_text_file(lion_port.path_to_test_expectations_file())
- self.assertEqual(new_expectations, "BUGX SNOWLEOPARD : userscripts/another-test.html = IMAGE\nBUGZ LINUX : userscripts/another-test.html = IMAGE\n")
+ self.assertEqual(new_expectations, "Bug(x) [ SnowLeopard ] userscripts/another-test.html [ ImageOnlyFailure ]\nBug(z) [ Linux ] userscripts/another-test.html [ ImageOnlyFailure ]\n")
def test_rebaseline_test(self):
command = RebaselineTest()
@@ -331,7 +331,7 @@ MOCK run_command: ['qmake', '-v'], cwd=None
OutputCapture().assert_outputs(self, command.execute, [options, args, tool], expected_stdout=expected_stdout, expected_stderr=expected_stderr, expected_logs=expected_logs)
def test_rebaseline_expectations_noop(self):
- self._assert_command(RebaselineExpectations(), expected_logs='Did not find any tests marked REBASELINE.\n')
+ self._assert_command(RebaselineExpectations(), expected_logs='Did not find any tests marked Rebaseline.\n')
def test_overrides_are_included_correctly(self):
command = RebaselineExpectations()
@@ -346,13 +346,13 @@ MOCK run_command: ['qmake', '-v'], cwd=None
port._filesystem.write_text_file(expectations_path, expectations_contents)
port.expectations_dict = lambda: {
expectations_path: expectations_contents,
- 'overrides': ('BUGX REBASELINE : userscripts/another-test.html = TEXT\n'
- 'BUGY : userscripts/test.html = CRASH\n')}
+ 'overrides': ('Bug(x) userscripts/another-test.html [ Failure Rebaseline ]\n'
+ 'Bug(y) userscripts/test.html [ Crash ]\n')}
for path in port.expectations_files():
port._filesystem.write_text_file(path, '')
port._filesystem.write_text_file(port.layout_tests_dir() + '/userscripts/another-test.html', '')
- self.assertEquals(command._tests_to_rebaseline(port), {'userscripts/another-test.html': set(['txt'])})
+ self.assertEquals(command._tests_to_rebaseline(port), {'userscripts/another-test.html': set(['png', 'txt', 'wav'])})
self.assertEquals(port._filesystem.read_text_file(expectations_path), expectations_contents)
def test_rebaseline(self):