Title: [127925] trunk/Tools
- Revision
- 127925
- Author
- o...@chromium.org
- Date
- 2012-09-07 15:06:35 -0700 (Fri, 07 Sep 2012)
Log Message
Handle non-existant TestExpectations files gracefully
https://bugs.webkit.org/show_bug.cgi?id=96149
Reviewed by Eric Seidel.
Even when we get rid of Skipped files, we shouldn't have each port
require a TestExpectations file for each platform if it doesn't
need one.
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.expectations_dict):
* Scripts/webkitpy/layout_tests/port/base_unittest.py:
(PortTest.test_nonexistant_expectations):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (127924 => 127925)
--- trunk/Tools/ChangeLog 2012-09-07 21:57:15 UTC (rev 127924)
+++ trunk/Tools/ChangeLog 2012-09-07 22:06:35 UTC (rev 127925)
@@ -1,3 +1,19 @@
+2012-09-07 Ojan Vafai <o...@chromium.org>
+
+ Handle non-existant TestExpectations files gracefully
+ https://bugs.webkit.org/show_bug.cgi?id=96149
+
+ Reviewed by Eric Seidel.
+
+ Even when we get rid of Skipped files, we shouldn't have each port
+ require a TestExpectations file for each platform if it doesn't
+ need one.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.expectations_dict):
+ * Scripts/webkitpy/layout_tests/port/base_unittest.py:
+ (PortTest.test_nonexistant_expectations):
+
2012-09-07 Tony Chang <t...@chromium.org>
Regression: check-webkit-style no longer checks TestExpectations for syntax errors
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py (127924 => 127925)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-09-07 21:57:15 UTC (rev 127924)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-09-07 22:06:35 UTC (rev 127925)
@@ -1006,7 +1006,8 @@
expectations = OrderedDict()
for path in self.expectations_files():
- expectations[path] = self._filesystem.read_text_file(path)
+ if self._filesystem.exists(path):
+ expectations[path] = self._filesystem.read_text_file(path)
for path in self.get_option('additional_expectations', []):
expanded_path = self._filesystem.expanduser(path)
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py (127924 => 127925)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py 2012-09-07 21:57:15 UTC (rev 127924)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py 2012-09-07 22:06:35 UTC (rev 127925)
@@ -264,6 +264,12 @@
[('/tmp/local-baselines', 'fast/test-expected.txt')])
self.assertEqual(port.baseline_path(), '/foo')
+ def test_nonexistant_expectations(self):
+ port = self.make_port(port_name='foo')
+ port.expectations_files = lambda: ['/mock-checkout/LayoutTests/platform/exists/TestExpectations', '/mock-checkout/LayoutTests/platform/nonexistant/TestExpectations']
+ port._filesystem.write_text_file('/mock-checkout/LayoutTests/platform/exists/TestExpectations', '')
+ self.assertEquals('\n'.join(port.expectations_dict().keys()), '/mock-checkout/LayoutTests/platform/exists/TestExpectations')
+
def test_additional_expectations(self):
port = self.make_port(port_name='foo')
port.port_name = 'foo'
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes