Title: [121784] trunk/Tools
Revision
121784
Author
[email protected]
Date
2012-07-03 10:21:52 -0700 (Tue, 03 Jul 2012)

Log Message

Make the skia_test_expectations.txt file optional.
https://bugs.webkit.org/show_bug.cgi?id=90400

Reviewed by Dirk Pranke.

It used to be optional. This regressed at some point. It's important that it be
optional so that webkit-patch commands work in a pure-webkit checkout for chromium bots.
Specifically, this was breaking webkit-patch rebaseline-test when it would go to update
TestExpectations.

* Scripts/webkitpy/layout_tests/port/chromium.py:
(ChromiumPort.expectations_files):
* Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
(ChromiumDriverTest.test_expectations_dict):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (121783 => 121784)


--- trunk/Tools/ChangeLog	2012-07-03 17:17:12 UTC (rev 121783)
+++ trunk/Tools/ChangeLog	2012-07-03 17:21:52 UTC (rev 121784)
@@ -1,3 +1,20 @@
+2012-07-02  Ojan Vafai  <[email protected]>
+
+        Make the skia_test_expectations.txt file optional.
+        https://bugs.webkit.org/show_bug.cgi?id=90400
+
+        Reviewed by Dirk Pranke.
+
+        It used to be optional. This regressed at some point. It's important that it be
+        optional so that webkit-patch commands work in a pure-webkit checkout for chromium bots.
+        Specifically, this was breaking webkit-patch rebaseline-test when it would go to update
+        TestExpectations.
+
+        * Scripts/webkitpy/layout_tests/port/chromium.py:
+        (ChromiumPort.expectations_files):
+        * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
+        (ChromiumDriverTest.test_expectations_dict):
+
 2012-07-03  Raphael Kubo da Costa  <[email protected]>
 
         [jhbuild][EFL] Bump libffi dependency.

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py (121783 => 121784)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py	2012-07-03 17:17:12 UTC (rev 121783)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py	2012-07-03 17:21:52 UTC (rev 121784)
@@ -345,7 +345,13 @@
     ])
 
     def expectations_files(self):
-        paths = [self.path_to_test_expectations_file(), self.path_from_chromium_base('skia', 'skia_test_expectations.txt')]
+        paths = [self.path_to_test_expectations_file()]
+        skia_expectations_path = self.path_from_chromium_base('skia', 'skia_test_expectations.txt')
+        if self._filesystem.exists(skia_expectations_path):
+            paths.append(skia_expectations_path)
+        else:
+            _log.warning("Using the chromium port without having the downstream skia_test_expectations.txt file checked out. Expectations related things might be wonky.")
+
         builder_name = self.get_option('builder_name', 'DUMMY_BUILDER_NAME')
         if builder_name == 'DUMMY_BUILDER_NAME' or '(deps)' in builder_name or builder_name in self.try_builder_names:
             paths.append(self.path_from_chromium_base('webkit', 'tools', 'layout_tests', 'test_expectations.txt'))

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py (121783 => 121784)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py	2012-07-03 17:17:12 UTC (rev 121783)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py	2012-07-03 17:21:52 UTC (rev 121784)
@@ -164,6 +164,8 @@
         skia_overrides_path = port.path_from_chromium_base(
             'skia', 'skia_test_expectations.txt')
 
+        port._filesystem.write_text_file(skia_overrides_path, 'dummay text')
+
         port._options.builder_name = 'DUMMY_BUILDER_NAME'
         self.assertEquals(port.expectations_files(), [expectations_path, skia_overrides_path, chromium_overrides_path])
 

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py (121783 => 121784)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py	2012-07-03 17:17:12 UTC (rev 121783)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py	2012-07-03 17:21:52 UTC (rev 121784)
@@ -170,7 +170,15 @@
         self.driver._start(True, [])
         self.assertFalse(self.port._filesystem.isdir(last_tmpdir))
 
+    def test_expectations_dict(self):
+        self.port._filesystem.write_text_file('/mock-checkout/LayoutTests/platform/chromium/TestExpectations', 'upstream')
+        self.port._filesystem.write_text_file('/mock-checkout/Source/WebKit/chromium/webkit/tools/layout_tests/test_expectations.txt', 'downstream')
+        self.assertEquals('\n'.join(self.port.expectations_dict().values()), 'upstream\ndownstream')
 
+        self.port._filesystem.write_text_file(self.port.path_from_chromium_base('skia', 'skia_test_expectations.txt'), 'skia')
+        self.assertEquals('\n'.join(self.port.expectations_dict().values()), 'upstream\nskia\ndownstream')
+
+
 class ChromiumPortLoggingTest(logtesting.LoggingTestCase):
 
     # FIXME: put this someplace more useful

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py (121783 => 121784)


--- trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py	2012-07-03 17:17:12 UTC (rev 121783)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py	2012-07-03 17:21:52 UTC (rev 121784)
@@ -74,6 +74,7 @@
         expected_logs = """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.
+Using the chromium port without having the downstream skia_test_expectations.txt file checked out. Expectations related things might be wonky.
 """
         OutputCapture().assert_outputs(self, command._rebaseline_test_and_update_expectations, ["Webkit Mac10.7", "userscripts/another-test.html", None], expected_logs=expected_logs)
 
@@ -272,6 +273,12 @@
 Retrieving results for win-7sp0 from Apple Win 7 Release (Tests).
     userscripts/another-test.html (txt)
     userscripts/images.svg (png)
+Using the chromium port without having the downstream skia_test_expectations.txt file checked out. Expectations related things might be wonky.
+Using the chromium port without having the downstream skia_test_expectations.txt file checked out. Expectations related things might be wonky.
+Using the chromium port without having the downstream skia_test_expectations.txt file checked out. Expectations related things might be wonky.
+Using the chromium port without having the downstream skia_test_expectations.txt file checked out. Expectations related things might be wonky.
+Using the chromium port without having the downstream skia_test_expectations.txt file checked out. Expectations related things might be wonky.
+Using the chromium port without having the downstream skia_test_expectations.txt file checked out. Expectations related things might be wonky.
 """
 
         expected_stdout = """[(['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Linux 32', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Linux', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Mac10.6', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Mac10.7', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Win7', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Apple Win 7 Release (Tests)', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'EFL Linux 64-bit Release', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Win', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'GTK Linux 64-bit Release', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Qt Linux Release', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Apple Lion Release WK1 (Tests)', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Linux 32', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Linux', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Mac10.6', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Mac10.7', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Win7', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Apple Win 7 Release (Tests)', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'EFL Linux 64-bit Release', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Win', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'GTK Linux 64-bit Release', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Qt Linux Release', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Apple Lion Release WK1 (Tests)', 'userscripts/images.svg'], '/mock-checkout')]
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to