Changeset 84207 in webkit


Ignore:
Timestamp:
Apr 18, 2011 4:31:42 PM (13 years ago)
Author:
dpranke@chromium.org
Message:

2011-04-18 Dirk Pranke <dpranke@chromium.org>

Reviewed by Eric Seidel.

new-run-webkit-tests: add an --additional-drt-flag option
https://bugs.webkit.org/show_bug.cgi?id=58680

NRWT has a bunch of command line flags that exist to pass
custom flags to DRT, especially on chromium. It would be nice
if there was a generic mechanism to pass through flags so we
didn't have all the custom ones.

  • Scripts/webkitpy/layout_tests/port/chromium.py:
  • Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
  • Scripts/webkitpy/layout_tests/port/port_testcase.py:
  • Scripts/webkitpy/layout_tests/port/test.py:
  • Scripts/webkitpy/layout_tests/port/webkit.py:
  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:
Location:
trunk/Tools
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r84206 r84207  
     12011-04-18  Dirk Pranke  <dpranke@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        new-run-webkit-tests: add an --additional-drt-flag option
     6        https://bugs.webkit.org/show_bug.cgi?id=58680
     7
     8        NRWT has a bunch of command line flags that exist to pass
     9        custom flags to DRT, especially on chromium. It would be nice
     10        if there was a generic mechanism to pass through flags so we
     11        didn't have all the custom ones.
     12
     13        * Scripts/webkitpy/layout_tests/port/chromium.py:
     14        * Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
     15        * Scripts/webkitpy/layout_tests/port/port_testcase.py:
     16        * Scripts/webkitpy/layout_tests/port/test.py:
     17        * Scripts/webkitpy/layout_tests/port/webkit.py:
     18        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
     19
    1202011-04-05  Jer Noble  <jer.noble@apple.com>
    221
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py

    r84205 r84207  
    376376        if self._port.get_option('enable_hardware_gpu'):
    377377            cmd.append('--enable-hardware-gpu')
     378
     379        cmd.extend(self._port.get_option('additional_drt_flag', []))
    378380        return cmd
    379381
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py

    r83475 r84207  
    4040from webkitpy.layout_tests.port import test
    4141
     42from webkitpy.tool import mocktool
     43mock_options = mocktool.MockOptions(use_apache=True,
     44                                    configuration='Release')
     45
    4246
    4347class MockDRTPortTest(port_testcase.PortTestCase):
    44     def make_port(self):
     48    def make_port(self, options=mock_options):
    4549        if sys.platform == 'win32':
    4650            # We use this because the 'win' port doesn't work yet.
    47             return mock_drt.MockDRTPort(port_name='mock-chromium-win')
    48         return mock_drt.MockDRTPort()
     51            return mock_drt.MockDRTPort(port_name='mock-chromium-win', options=options)
     52        return mock_drt.MockDRTPort(options=options)
    4953
    5054    def test_default_worker_model(self):
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py

    r83646 r84207  
    7777            return
    7878        self.assertTrue(len(port.driver_cmd_line()))
     79
     80        options = mocktool.MockOptions(additional_drt_flag=['--foo=bar', '--foo=baz'])
     81        port = self.make_port(options=options)
     82        cmd_line = port.driver_cmd_line()
     83        self.assertTrue('--foo=bar' in cmd_line)
     84        self.assertTrue('--foo=baz' in cmd_line)
    7985
    8086    def disabled_test_http_server(self):
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/test.py

    r83646 r84207  
    423423
    424424    def cmd_line(self):
    425         return [self._port._path_to_driver()]
     425        return [self._port._path_to_driver()] + self._port.get_option('additional_drt_flag', [])
    426426
    427427    def poll(self):
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py

    r83646 r84207  
    373373    def cmd_line(self):
    374374        cmd = self._command_wrapper(self._port.get_option('wrapper'))
    375         cmd += [self._port._path_to_driver(), '-']
    376 
     375        cmd.append(self._port._path_to_driver())
    377376        if self._port.get_option('pixel_tests'):
    378377            cmd.append('--pixel-tests')
    379 
     378        cmd.extend(self._port.get_option('additional_drt_flag', []))
     379        cmd.append('-')
    380380        return cmd
    381381
  • trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r83783 r84207  
    293293            default=False, help="Reset any existing baselines to the "
    294294                 "generated results"),
     295        optparse.make_option("--additional-drt-flag", action="append",
     296            default=[], help="Additional command line flag to pass to DumpRenderTree "
     297                 "Specify multiple times to add multiple flags."),
    295298        optparse.make_option("--additional-platform-directory", action="append",
    296299            default=[], help="Additional directory where to look for test "
Note: See TracChangeset for help on using the changeset viewer.