Changeset 90285 in webkit


Ignore:
Timestamp:
Jul 1, 2011 3:11:46 PM (13 years ago)
Author:
eric@webkit.org
Message:

2011-07-01 Eric Seidel <eric@webkit.org>

new-run-webkit-tests results does not understand that mac uses test_expectations files
https://bugs.webkit.org/show_bug.cgi?id=63838

Reviewed by Adam Barth.

We've decided to "enable" test_expectations for the Mac port for now.
It makes the results.html results much more confusing to read, but at least they're
no longer lying to us.

  • Scripts/webkitpy/layout_tests/layout_package/manager.py:
  • Scripts/webkitpy/layout_tests/port/base.py:
  • Scripts/webkitpy/layout_tests/port/base_unittest.py:
Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r90279 r90285  
     12011-07-01  Eric Seidel  <eric@webkit.org>
     2
     3        new-run-webkit-tests results does not understand that mac uses test_expectations files
     4        https://bugs.webkit.org/show_bug.cgi?id=63838
     5
     6        Reviewed by Adam Barth.
     7
     8        We've decided to "enable" test_expectations for the Mac port for now.
     9        It makes the results.html results much more confusing to read, but at least they're
     10        no longer lying to us.
     11
     12        * Scripts/webkitpy/layout_tests/layout_package/manager.py:
     13        * Scripts/webkitpy/layout_tests/port/base.py:
     14        * Scripts/webkitpy/layout_tests/port/base_unittest.py:
     15
    1162011-07-01  Adam Barth  <abarth@webkit.org>
    217
  • trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/manager.py

    r90279 r90285  
    207207    results['num_flaky'] = num_flaky
    208208    results['num_regressions'] = num_regressions
    209     # FIXME: If non-chromium ports start using an expectations file,
    210     # we should make this check more robust.
    211     results['uses_expectations_file'] = port_obj.name().find('chromium') != -1
     209    results['uses_expectations_file'] = port_obj.uses_test_expectations_file()
    212210    results['layout_tests_dir'] = port_obj.layout_tests_dir()
    213211    results['has_wdiff'] = port_obj.wdiff_available()
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py

    r90246 r90285  
    712712        raise NotImplementedError
    713713
     714    def uses_test_expectations_file(self):
     715        # This is different from checking test_expectations() is None, because
     716        # some ports have Skipped files which are returned as part of test_expectations().
     717        return self._filesystem.exists(self.path_to_test_expectations_file())
     718
    714719    def test_expectations(self):
    715720        """Returns the test expectations for this port.
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py

    r89512 r90285  
    208208            path = test_file
    209209
    210         self.assertEqual(port.filename_to_uri(test_file),
    211                          abspath_to_uri(test_file))
     210        self.assertEqual(port.filename_to_uri(test_file), abspath_to_uri(test_file))
    212211
    213212    def test_get_option__set(self):
     
    235234    def test_additional_platform_directory(self):
    236235        filesystem = MockFileSystem()
    237         options, args = optparse.OptionParser().parse_args([])
    238         port = base.Port(port_name='foo', filesystem=filesystem, options=options)
     236        port = base.Port(port_name='foo', filesystem=filesystem)
    239237        port.baseline_search_path = lambda: ['LayoutTests/platform/foo']
    240238        layout_test_dir = port.layout_tests_dir()
     
    248246
    249247        # Simple additional platform directory
    250         options.additional_platform_directory = ['/tmp/local-baselines']
     248        port._options.additional_platform_directory = ['/tmp/local-baselines']
    251249        filesystem.files = {
    252250            '/tmp/local-baselines/fast/test-expected.txt': 'foo',
     
    258256
    259257        # Multiple additional platform directories
    260         options.additional_platform_directory = ['/foo', '/tmp/local-baselines']
     258        port._options.additional_platform_directory = ['/foo', '/tmp/local-baselines']
    261259        self.assertEqual(
    262260            port.expected_baselines(test_file, '.txt'),
    263261            [('/tmp/local-baselines', 'fast/test-expected.txt')])
    264262        self.assertEqual(port.baseline_path(), '/foo')
     263
     264    def test_uses_test_expectations_file(self):
     265        filesystem = MockFileSystem()
     266        port = base.Port(port_name='foo', filesystem=filesystem)
     267        port.path_to_test_expectations_file = lambda: '/mock/test_expectations.txt'
     268        self.assertFalse(port.uses_test_expectations_file())
     269        port._filesystem = MockFileSystem({'/mock/test_expectations.txt': ''})
     270        self.assertTrue(port.uses_test_expectations_file())
     271
    265272
    266273class VirtualTest(unittest.TestCase):
Note: See TracChangeset for help on using the changeset viewer.