Add setting of additional_expectations option to
authorepoger@chromium.org <epoger@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2012 13:35:10 +0000 (13:35 +0000)
committerepoger@chromium.org <epoger@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2012 13:35:10 +0000 (13:35 +0000)
chromium_unittest.test_overrides_and_builder_names(),
so we can test order in which the base and chromium expectations files
are combined.

https://bugs.webkit.org/show_bug.cgi?id=86642

Reviewed by Dirk Pranke.

* Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
(ChromiumPortTest.test_overrides_and_builder_names):

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

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py

index 72750a3..dc199a2 100644 (file)
@@ -1,3 +1,17 @@
+2012-05-17  Elliot Poger  <epoger@chromium.org>
+
+        Add setting of additional_expectations option to 
+        chromium_unittest.test_overrides_and_builder_names(),
+        so we can test order in which the base and chromium expectations files
+        are combined.
+
+        https://bugs.webkit.org/show_bug.cgi?id=86642
+
+        Reviewed by Dirk Pranke.
+
+        * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
+        (ChromiumPortTest.test_overrides_and_builder_names):
+
 2012-05-17  Balazs Kelemen  <kbalazs@webkit.org>
 
         [Qt] Web process hangs while waiting for plugin process connection during layouttests
index 026f811..d2591ae 100644 (file)
@@ -290,18 +290,40 @@ class ChromiumPortTest(port_testcase.PortTestCase):
         port._filesystem = filesystem
         port.path_from_chromium_base = lambda *comps: '/' + '/'.join(comps)
 
-        overrides_path = port.path_from_chromium_base('webkit', 'tools', 'layout_tests', 'test_expectations.txt')
-        OVERRIDES = 'foo'
-        filesystem.files[overrides_path] = OVERRIDES
+        chromium_overrides_path = port.path_from_chromium_base(
+            'webkit', 'tools', 'layout_tests', 'test_expectations.txt')
+        CHROMIUM_OVERRIDES = 'contents of %s\n' % chromium_overrides_path
+
+        filesystem.write_text_file(chromium_overrides_path, CHROMIUM_OVERRIDES)
+
+        additional_expectations_path = port.path_from_chromium_base(
+            'additional_expectations.txt')
+        ADDITIONAL_EXPECTATIONS = 'contents of %s\n' % additional_expectations_path
+        filesystem.write_text_file(additional_expectations_path, ADDITIONAL_EXPECTATIONS)
 
         port._options.builder_name = 'DUMMY_BUILDER_NAME'
-        self.assertEquals(port.test_expectations_overrides(), OVERRIDES)
+        port._options.additional_expectations = []
+        self.assertEquals(port.test_expectations_overrides(),
+                          CHROMIUM_OVERRIDES)
+        port._options.additional_expectations = [additional_expectations_path]
+        self.assertEquals(port.test_expectations_overrides(),
+                          CHROMIUM_OVERRIDES + ADDITIONAL_EXPECTATIONS)
 
         port._options.builder_name = 'builder (deps)'
-        self.assertEquals(port.test_expectations_overrides(), OVERRIDES)
+        port._options.additional_expectations = []
+        self.assertEquals(port.test_expectations_overrides(),
+                          CHROMIUM_OVERRIDES)
+        port._options.additional_expectations = [additional_expectations_path]
+        self.assertEquals(port.test_expectations_overrides(),
+                          CHROMIUM_OVERRIDES + ADDITIONAL_EXPECTATIONS)
 
         port._options.builder_name = 'builder'
-        self.assertEquals(port.test_expectations_overrides(), None)
+        port._options.additional_expectations = []
+        self.assertEquals(port.test_expectations_overrides(),
+                          None)
+        port._options.additional_expectations = [additional_expectations_path]
+        self.assertEquals(port.test_expectations_overrides(),
+                          ADDITIONAL_EXPECTATIONS)
 
 
 class ChromiumPortLoggingTest(logtesting.LoggingTestCase):