Changeset 120863 in webkit


Ignore:
Timestamp:
Jun 20, 2012 2:22:35 PM (12 years ago)
Author:
dpranke@chromium.org
Message:

new-run-webkit-tests appends "/Debug" or "/Release" to $WEBKITOUTPUTDIR
https://bugs.webkit.org/show_bug.cgi?id=69360

Reviewed by Eric Seidel.

Reviewed by Eric Seidel.

Propagate the 'port_implementation' part of the platform (i.e.,
gtk,qt,chromium) to webkit-build-directory so that we can pick
up the gtk-specific handling of WEBKITOUTPUTDIR ...

I didn't write any additional tests for this; testing it
properly is an integration test between the python code and the
perl code, which I verified by hand.

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

(Port.init):

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

(Config.init):
(Config.build_directory):

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

(MockConfig.init):

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

(ConfigTest.test_build_directory_passes_port_implementation):

Location:
trunk/Tools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r120853 r120863  
     12012-06-20  Dirk Pranke  <dpranke@chromium.org>
     2
     3        new-run-webkit-tests appends "/Debug" or "/Release" to $WEBKITOUTPUTDIR
     4        https://bugs.webkit.org/show_bug.cgi?id=69360
     5
     6        Reviewed by Eric Seidel.
     7
     8        Reviewed by Eric Seidel.
     9
     10        Propagate the 'port_implementation' part of the platform (i.e.,
     11        gtk,qt,chromium) to webkit-build-directory so that we can pick
     12        up the gtk-specific handling of WEBKITOUTPUTDIR ...
     13
     14        I didn't write any additional tests for this; testing it
     15        properly is an integration test between the python code and the
     16        perl code, which I verified by hand.
     17
     18        * Scripts/webkitpy/layout_tests/port/base.py:
     19        (Port.__init__):
     20        * Scripts/webkitpy/layout_tests/port/config.py:
     21        (Config.__init__):
     22        (Config.build_directory):
     23        * Scripts/webkitpy/layout_tests/port/config_mock.py:
     24        (MockConfig.__init__):
     25        * Scripts/webkitpy/layout_tests/port/config_unittest.py:
     26        (ConfigTest.test_build_directory_passes_port_implementation):
     27
    1282012-06-20  Dirk Pranke  <dpranke@chromium.org>
    229
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py

    r120852 r120863  
    105105        self._executive = host.executive
    106106        self._filesystem = host.filesystem
    107         self._config = config or port_config.Config(self._executive, self._filesystem)
     107        self._config = config or port_config.Config(self._executive, self._filesystem, self.port_name)
    108108
    109109        self._helper = None
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/config.py

    r120183 r120863  
    6262    }
    6363
    64     def __init__(self, executive, filesystem):
     64    def __init__(self, executive, filesystem, port_implementation=None):
    6565        self._executive = executive
    6666        self._filesystem = filesystem
     
    6868        self._default_configuration = None
    6969        self._build_directories = {}
     70        self._port_implementation = port_implementation
    7071
    7172    def build_directory(self, configuration):
     
    7677            configuration = ""
    7778            flags = []
     79
     80        if self._port_implementation:
     81            flags.append('--' + self._port_implementation)
    7882
    7983        if not self._build_directories.get(configuration):
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/config_mock.py

    r112981 r120863  
    3939    }
    4040
    41     def __init__(self, filesystem=None, default_configuration='Release'):
     41    def __init__(self, filesystem=None, default_configuration='Release', port_implementation=None):
    4242        self._filesystem = filesystem or MockFileSystem()
    4343        self._default_configuration = default_configuration
     44        self._port_implmentation = port_implementation
    4445
    4546    def flag_for_configuration(self, configuration):
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/config_unittest.py

    r120183 r120863  
    4747        config.clear_cached_configuration()
    4848
    49     def make_config(self, output='', files=None, exit_code=0, exception=None, run_command_fn=None, stderr=''):
     49    def make_config(self, output='', files=None, exit_code=0, exception=None, run_command_fn=None, stderr='', port_implementation=None):
    5050        e = MockExecutive2(output=output, exit_code=exit_code, exception=exception, run_command_fn=run_command_fn, stderr=stderr)
    5151        fs = MockFileSystem(files)
    52         return config.Config(e, fs)
     52        return config.Config(e, fs, port_implementation=port_implementation)
    5353
    5454    def assert_configuration(self, contents, expected):
     
    9191        c = self.make_config(output='/WebKitBuild/', stderr="mock stderr output from webkit-build-directory")
    9292        self.assertEqual(c.build_directory(None), '/WebKitBuild/')
     93
     94    def test_build_directory_passes_port_implementation(self):
     95        def mock_run_command(arg_list):
     96            self.assetEquals('--gtk' in arg_list)
     97            return '/tmp'
     98
     99        c = self.make_config(run_command_fn=mock_run_command, port_implementation='gtk')
    93100
    94101    def test_default_configuration__release(self):
Note: See TracChangeset for help on using the changeset viewer.