⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 117789 in webkit


Ignore:
Timestamp:
May 21, 2012, 9:08:25 AM (14 years ago)
Author:
epoger@chromium.org
Message:

add skia_test_expectations override file to chromium NRWT
https://bugs.webkit.org/show_bug.cgi?id=86749

Reviewed by Dirk Pranke

  • Scripts/webkitpy/layout_tests/port/base.py:

(Port.test_expectations_overrides):

  • Scripts/webkitpy/layout_tests/port/chromium.py:

(ChromiumPort.test_expectations_overrides):

  • Scripts/webkitpy/layout_tests/port/chromium_unittest.py:

(ChromiumPortTest.test_overrides_and_builder_names):

Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r117787 r117789  
     12012-05-21  Elliot Poger  <epoger@chromium.org>
     2
     3        add skia_test_expectations override file to chromium NRWT
     4        https://bugs.webkit.org/show_bug.cgi?id=86749
     5
     6        Reviewed by Dirk Pranke
     7
     8        * Scripts/webkitpy/layout_tests/port/base.py:
     9        (Port.test_expectations_overrides):
     10        * Scripts/webkitpy/layout_tests/port/chromium.py:
     11        (ChromiumPort.test_expectations_overrides):
     12        * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
     13        (ChromiumPortTest.test_overrides_and_builder_names):
     14
    1152012-05-21  Thiago Marcos P. Santos  <thiago.santos@intel.com>
    216
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py

    r116209 r117789  
    892892        for path in self.get_option('additional_expectations', []):
    893893            if self._filesystem.exists(self._filesystem.expanduser(path)):
     894                _log.debug("reading additional_expectations from path '%s'" % path)
    894895                overrides += self._filesystem.read_text_file(self._filesystem.expanduser(path))
    895896            else:
    896                 _log.warning("overrides path '%s' does not exist" % path)
     897                _log.warning("additional_expectations path '%s' does not exist" % path)
    897898        return overrides or None
    898899
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py

    r117010 r117789  
    321321    ])
    322322
     323    def _expectations_file_contents(self, filetype, filepath):
     324        if self._filesystem.exists(filepath):
     325            _log.debug(
     326                "reading %s test_expectations overrides from file '%s'" %
     327                (filetype, filepath))
     328            return (self._filesystem.read_text_file(filepath) or '')
     329        else:
     330            _log.warning(
     331                "%s test_expectations overrides file '%s' does not exist" %
     332                (filetype, filepath))
     333            return ''
     334
    323335    def test_expectations_overrides(self):
     336        combined_overrides = ''
     337        combined_overrides += self._expectations_file_contents(
     338            'skia', self.path_from_chromium_base(
     339                'skia', 'skia_test_expectations.txt'))
    324340        # FIXME: It seems bad that run_webkit_tests.py uses a hardcoded dummy
    325341        # builder string instead of just using None.
    326342        builder_name = self.get_option('builder_name', 'DUMMY_BUILDER_NAME')
     343        if builder_name == 'DUMMY_BUILDER_NAME' or '(deps)' in builder_name or builder_name in self.try_builder_names:
     344            combined_overrides += self._expectations_file_contents(
     345                'chromium', self.path_from_chromium_base(
     346                    'webkit', 'tools', 'layout_tests', 'test_expectations.txt'))
     347
    327348        base_overrides = super(ChromiumPort, self).test_expectations_overrides()
    328         if builder_name != 'DUMMY_BUILDER_NAME' and not '(deps)' in builder_name and not builder_name in self.try_builder_names:
    329             return base_overrides
    330 
    331         try:
    332             overrides_path = self.path_from_chromium_base('webkit', 'tools', 'layout_tests', 'test_expectations.txt')
    333         except AssertionError, e:
    334             return base_overrides
    335         if not self._filesystem.exists(overrides_path):
    336             return base_overrides
    337         return self._filesystem.read_text_file(overrides_path) + (base_overrides or '')
     349        combined_overrides += (base_overrides or '')
     350        return combined_overrides
    338351
    339352    def repository_paths(self):
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py

    r117443 r117789  
    294294            'webkit', 'tools', 'layout_tests', 'test_expectations.txt')
    295295        CHROMIUM_OVERRIDES = 'contents of %s\n' % chromium_overrides_path
    296 
    297296        filesystem.write_text_file(chromium_overrides_path, CHROMIUM_OVERRIDES)
     297        skia_overrides_path = port.path_from_chromium_base(
     298            'skia', 'skia_test_expectations.txt')
     299        SKIA_OVERRIDES = 'contents of %s\n' % skia_overrides_path
     300        filesystem.write_text_file(skia_overrides_path, SKIA_OVERRIDES)
    298301
    299302        additional_expectations_path = port.path_from_chromium_base(
     
    305308        port._options.additional_expectations = []
    306309        self.assertEquals(port.test_expectations_overrides(),
    307                           CHROMIUM_OVERRIDES)
     310                          SKIA_OVERRIDES + CHROMIUM_OVERRIDES)
    308311        port._options.additional_expectations = [additional_expectations_path]
    309312        self.assertEquals(port.test_expectations_overrides(),
    310                           CHROMIUM_OVERRIDES + ADDITIONAL_EXPECTATIONS)
     313                          SKIA_OVERRIDES + CHROMIUM_OVERRIDES + ADDITIONAL_EXPECTATIONS)
    311314
    312315        port._options.builder_name = 'builder (deps)'
    313316        port._options.additional_expectations = []
    314317        self.assertEquals(port.test_expectations_overrides(),
    315                           CHROMIUM_OVERRIDES)
     318                          SKIA_OVERRIDES + CHROMIUM_OVERRIDES)
    316319        port._options.additional_expectations = [additional_expectations_path]
    317320        self.assertEquals(port.test_expectations_overrides(),
    318                           CHROMIUM_OVERRIDES + ADDITIONAL_EXPECTATIONS)
    319 
     321                          SKIA_OVERRIDES + CHROMIUM_OVERRIDES + ADDITIONAL_EXPECTATIONS)
     322
     323        # A builder which does NOT observe the Chromium test_expectations,
     324        # but still observes the Skia test_expectations...
    320325        port._options.builder_name = 'builder'
    321326        port._options.additional_expectations = []
    322327        self.assertEquals(port.test_expectations_overrides(),
    323                           None)
     328                          SKIA_OVERRIDES)
    324329        port._options.additional_expectations = [additional_expectations_path]
    325330        self.assertEquals(port.test_expectations_overrides(),
    326                           ADDITIONAL_EXPECTATIONS)
     331                          SKIA_OVERRIDES + ADDITIONAL_EXPECTATIONS)
    327332
    328333
Note: See TracChangeset for help on using the changeset viewer.