garden-o-matic isn't able to rebaseline audio failures
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Apr 2012 22:35:52 +0000 (22:35 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Apr 2012 22:35:52 +0000 (22:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=82957

Reviewed by Chris Rogers.

This patch just adds "wav" to the list of test suffixes and updates the
unit tests to show that we're rebaselining audio tests results now too.

* Scripts/webkitpy/tool/commands/rebaseline.py:
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(test_rebaseline_updates_expectations_file):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112955 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/tool/commands/rebaseline.py
Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py

index bef524a..367eff0 100644 (file)
@@ -1,5 +1,19 @@
 2012-04-02  Adam Barth  <abarth@webkit.org>
 
+        garden-o-matic isn't able to rebaseline audio failures
+        https://bugs.webkit.org/show_bug.cgi?id=82957
+
+        Reviewed by Chris Rogers.
+
+        This patch just adds "wav" to the list of test suffixes and updates the
+        unit tests to show that we're rebaselining audio tests results now too.
+
+        * Scripts/webkitpy/tool/commands/rebaseline.py:
+        * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+        (test_rebaseline_updates_expectations_file):
+
+2012-04-02  Adam Barth  <abarth@webkit.org>
+
         garden-o-matic should let you listen to audio failures
         https://bugs.webkit.org/show_bug.cgi?id=82953
 
index 3897795..83aa6a6 100644 (file)
@@ -47,7 +47,7 @@ from webkitpy.tool.grammar import pluralize
 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
 
 
-_baseline_suffix_list = ['png', 'txt']
+_baseline_suffix_list = ['png', 'wav', 'txt']
 
 
 # FIXME: Should TestResultWriter know how to compute this string?
index 1fe5d3c..46d9ed4 100644 (file)
@@ -55,8 +55,11 @@ BUGA DEBUG : fast/css/large-list-of-rules-crash.html = TEXT
         tool.filesystem.write_text_file(os.path.join(lion_port.layout_tests_dir(), "fast/css/large-list-of-rules-crash.html"), "Dummy test contents")
         tool.filesystem.write_text_file(os.path.join(lion_port.layout_tests_dir(), "userscripts/another-test.html"), "Dummy test contents")
 
-        expected_stdout = "Retrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-results/userscripts/another-test-actual.png.\nRetrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-results/userscripts/another-test-actual.txt.\n"
-        command._rebaseline_test_and_update_expectations("Webkit Mac10.7", "userscripts/another-test.html", None)
+        expected_stdout = """Retrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-results/userscripts/another-test-actual.png.
+Retrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-results/userscripts/another-test-actual.wav.
+Retrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-results/userscripts/another-test-actual.txt.
+"""
+        OutputCapture().assert_outputs(self, command._rebaseline_test_and_update_expectations, ["Webkit Mac10.7", "userscripts/another-test.html", None], expected_stdout=expected_stdout)
 
         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
@@ -72,7 +75,10 @@ BUGA DEBUG : fast/css/large-list-of-rules-crash.html = TEXT
         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(os.path.join(lion_port.layout_tests_dir(), "userscripts/another-test.html"), "Dummy test contents")
 
-        expected_stdout = "Retrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-results/userscripts/another-test-actual.png.\nRetrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-results/userscripts/another-test-actual.txt.\n"
+        expected_stdout = """Retrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-results/userscripts/another-test-actual.png.
+Retrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-results/userscripts/another-test-actual.wav.
+Retrieving http://example.com/f/builders/Webkit Mac10.7/results/layout-test-results/userscripts/another-test-actual.txt.
+"""
         OutputCapture().assert_outputs(self, command._rebaseline_test_and_update_expectations, ["Webkit Mac10.7", "userscripts/another-test.html", None], expected_stdout=expected_stdout)
 
         new_expectations = tool.filesystem.read_text_file(lion_port.path_to_test_expectations_file())