Changeset 85735 in webkit


Ignore:
Timestamp:
May 4, 2011 5:39:25 AM (13 years ago)
Author:
mihaip@chromium.org
Message:

2011-05-04 Mihai Parparita <mihaip@chromium.org>

Reviewed by Ojan Vafai.

[NRWT] --new-baseline should put baselines in the directory specified by --additional-platform-directory
https://bugs.webkit.org/show_bug.cgi?id=60088

Makes --new-baseline put new baselines into the first entry in the
baseline search path, including any additional directories passed in via
--additional-platform-directory.

Simplifies baseline_path() by making it return the first entry in the
baseline search path instead of requiring each port to have an
implementation (should not result in any behavior change).

  • Scripts/webkitpy/layout_tests/port/base.py:
  • Scripts/webkitpy/layout_tests/port/base_unittest.py:
  • Scripts/webkitpy/layout_tests/port/chromium.py:
  • Scripts/webkitpy/layout_tests/port/chromium_gpu.py:
  • Scripts/webkitpy/layout_tests/port/chromium_linux.py:
  • Scripts/webkitpy/layout_tests/port/chromium_mac.py:
  • Scripts/webkitpy/layout_tests/port/chromium_win.py:
  • Scripts/webkitpy/layout_tests/port/mac.py:
  • Scripts/webkitpy/layout_tests/port/test.py:
  • Scripts/webkitpy/layout_tests/port/webkit.py:
Location:
trunk/Tools
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r85727 r85735  
     12011-05-04  Mihai Parparita  <mihaip@chromium.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        [NRWT] --new-baseline should put baselines in the directory specified by --additional-platform-directory
     6        https://bugs.webkit.org/show_bug.cgi?id=60088
     7       
     8        Makes --new-baseline put new baselines into the first entry in the
     9        baseline search path, including any additional directories passed in via
     10        --additional-platform-directory.
     11       
     12        Simplifies baseline_path() by making it return the first entry in the
     13        baseline search path instead of requiring each port to have an
     14        implementation (should not result in any behavior change).
     15
     16        * Scripts/webkitpy/layout_tests/port/base.py:
     17        * Scripts/webkitpy/layout_tests/port/base_unittest.py:
     18        * Scripts/webkitpy/layout_tests/port/chromium.py:
     19        * Scripts/webkitpy/layout_tests/port/chromium_gpu.py:
     20        * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
     21        * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
     22        * Scripts/webkitpy/layout_tests/port/chromium_win.py:
     23        * Scripts/webkitpy/layout_tests/port/mac.py:
     24        * Scripts/webkitpy/layout_tests/port/test.py:
     25        * Scripts/webkitpy/layout_tests/port/webkit.py:
     26
    1272011-05-04  Adam Barth  <abarth@webkit.org>
    228
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py

    r85347 r85735  
    164164        """Return the absolute path to the directory to store new baselines
    165165        in for this port."""
    166         raise NotImplementedError('Port.baseline_path')
     166        baseline_search_paths = \
     167            self.get_option('additional_platform_directory', []) + self.baseline_search_path()
     168        return baseline_search_paths[0]
    167169
    168170    def baseline_search_path(self):
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py

    r83783 r85735  
    237237        options, args = optparse.OptionParser().parse_args([])
    238238        port = base.Port(port_name='foo', filesystem=filesystem, options=options)
    239         port.baseline_search_path = lambda: []
     239        port.baseline_search_path = lambda: ['LayoutTests/platform/foo']
    240240        layout_test_dir = port.layout_tests_dir()
    241241        test_file = filesystem.join(layout_test_dir, 'fast', 'test.html')
     
    245245            port.expected_baselines(test_file, '.txt'),
    246246            [(None, 'fast/test-expected.txt')])
     247        self.assertEqual(port.baseline_path(), 'LayoutTests/platform/foo')
    247248
    248249        # Simple additional platform directory
     
    254255            port.expected_baselines(test_file, '.txt'),
    255256            [('/tmp/local-baselines', 'fast/test-expected.txt')])
     257        self.assertEqual(port.baseline_path(), '/tmp/local-baselines')
    256258
    257259        # Multiple additional platform directories
     
    260262            port.expected_baselines(test_file, '.txt'),
    261263            [('/tmp/local-baselines', 'fast/test-expected.txt')])
     264        self.assertEqual(port.baseline_path(), '/foo')
    262265
    263266class VirtualTest(unittest.TestCase):
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py

    r84207 r85735  
    8383
    8484
    85     def baseline_path(self):
    86         return self._webkit_baseline_path(self._name)
    87 
    8885    def check_build(self, needs_http):
    8986        result = True
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py

    r85628 r85735  
    9191        _set_gpu_options(self)
    9292
    93     def baseline_path(self):
    94         # GPU baselines aren't yet versioned.
    95         return self._webkit_baseline_path('chromium-gpu-linux')
    96 
    9793    def baseline_search_path(self):
    9894        # Mimic the Linux -> Win expectations fallback in the ordinary Chromium port.
     
    112108        _set_gpu_options(self)
    113109
    114     def baseline_path(self):
    115         # GPU baselines aren't yet versioned.
    116         return self._webkit_baseline_path('chromium-gpu-mac')
    117 
    118110    def baseline_search_path(self):
    119111        return (map(self._webkit_baseline_path, ['chromium-gpu-mac', 'chromium-gpu']) +
     
    132124        _set_gpu_options(self)
    133125
    134     def baseline_path(self):
    135         # GPU baselines aren't yet versioned.
    136         return self._webkit_baseline_path('chromium-gpu-win')
    137 
    138126    def baseline_search_path(self):
    139127        return (map(self._webkit_baseline_path, ['chromium-gpu-win', 'chromium-gpu']) +
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py

    r85347 r85735  
    9292        return 'x86'
    9393
    94     def baseline_path(self):
    95         if self._architecture == 'x86_64':
    96             return self._webkit_baseline_path(self._name)
    97         return self._webkit_baseline_path('chromium-linux')
    98 
    9994    def baseline_search_path(self):
    10095        port_names = self.FALLBACK_PATHS[self._architecture]
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py

    r85347 r85735  
    8080            assert self._version in self.SUPPORTED_OS_VERSIONS
    8181        self._operating_system = 'mac'
    82 
    83     def baseline_path(self):
    84         if self.version() in ('snowleopard', 'future'):
    85             # We treat Snow Leopard as the newest version of mac,
    86             # so it gets the base dir.
    87             return self._webkit_baseline_path('chromium-mac')
    88         return self._webkit_baseline_path(self.name())
    8982
    9083    def baseline_search_path(self):
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py

    r83880 r85735  
    9797        return env
    9898
    99     def baseline_path(self):
    100         if self.version() == 'win7':
    101             # Win 7 is the newest version of windows, so it gets the base dir.
    102             return self._webkit_baseline_path('chromium-win')
    103         return self._webkit_baseline_path(self.name())
    104 
    10599    def baseline_search_path(self):
    106100        port_names = self.FALLBACK_PATHS[self.version()]
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py

    r83880 r85735  
    9595        return child_processes
    9696
    97     def baseline_path(self):
    98         if self.version() != 'future':
    99             return WebKitPort.baseline_path(self)
    100 
    101         assert(self._name[-7:] == '-future')
    102         return self._webkit_baseline_path(self._name[:-7])
    103 
    10497    def baseline_search_path(self):
    10598        return map(self._webkit_baseline_path, self.FALLBACK_PATHS[self._version])
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/test.py

    r85609 r85735  
    284284        return 'junk'
    285285
    286     def baseline_path(self):
    287         # We don't bother with a fallback path.
    288         return self._filesystem.join(self.layout_tests_dir(), 'platform', self.name())
    289 
    290286    def baseline_search_path(self):
    291287        search_paths = {
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py

    r85256 r85735  
    6161            self._options.pixel_tests = False
    6262
    63     def baseline_path(self):
    64         return self._webkit_baseline_path(self._name)
    65 
    6663    def baseline_search_path(self):
    6764        return [self._webkit_baseline_path(self._name)]
Note: See TracChangeset for help on using the changeset viewer.