- Revision
- 120863
- Author
- [email protected]
- Date
- 2012-06-20 14:22:35 -0700 (Wed, 20 Jun 2012)
Log 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):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (120862 => 120863)
--- trunk/Tools/ChangeLog 2012-06-20 21:20:29 UTC (rev 120862)
+++ trunk/Tools/ChangeLog 2012-06-20 21:22:35 UTC (rev 120863)
@@ -1,5 +1,32 @@
2012-06-20 Dirk Pranke <[email protected]>
+ 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):
+
+2012-06-20 Dirk Pranke <[email protected]>
+
Fix import sorting missed in r120846
Reviewed by Tony Chang.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py (120862 => 120863)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-06-20 21:20:29 UTC (rev 120862)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-06-20 21:22:35 UTC (rev 120863)
@@ -104,7 +104,7 @@
self.host = host
self._executive = host.executive
self._filesystem = host.filesystem
- self._config = config or port_config.Config(self._executive, self._filesystem)
+ self._config = config or port_config.Config(self._executive, self._filesystem, self.port_name)
self._helper = None
self._http_server = None
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/config.py (120862 => 120863)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/config.py 2012-06-20 21:20:29 UTC (rev 120862)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/config.py 2012-06-20 21:22:35 UTC (rev 120863)
@@ -61,12 +61,13 @@
"Release": "--release",
}
- def __init__(self, executive, filesystem):
+ def __init__(self, executive, filesystem, port_implementation=None):
self._executive = executive
self._filesystem = filesystem
self._webkit_base_dir = None
self._default_configuration = None
self._build_directories = {}
+ self._port_implementation = port_implementation
def build_directory(self, configuration):
"""Returns the path to the build directory for the configuration."""
@@ -76,6 +77,9 @@
configuration = ""
flags = []
+ if self._port_implementation:
+ flags.append('--' + self._port_implementation)
+
if not self._build_directories.get(configuration):
args = ["perl", self.script_path("webkit-build-directory")] + flags
output = self._executive.run_command(args, cwd=self.webkit_base_dir(), return_stderr=False).rstrip()
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/config_mock.py (120862 => 120863)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/config_mock.py 2012-06-20 21:20:29 UTC (rev 120862)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/config_mock.py 2012-06-20 21:22:35 UTC (rev 120863)
@@ -38,9 +38,10 @@
"Release": "--release",
}
- def __init__(self, filesystem=None, default_configuration='Release'):
+ def __init__(self, filesystem=None, default_configuration='Release', port_implementation=None):
self._filesystem = filesystem or MockFileSystem()
self._default_configuration = default_configuration
+ self._port_implmentation = port_implementation
def flag_for_configuration(self, configuration):
return self._FLAGS_FROM_CONFIGURATIONS[configuration]
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/config_unittest.py (120862 => 120863)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/config_unittest.py 2012-06-20 21:20:29 UTC (rev 120862)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/config_unittest.py 2012-06-20 21:22:35 UTC (rev 120863)
@@ -46,10 +46,10 @@
def tearDown(self):
config.clear_cached_configuration()
- def make_config(self, output='', files=None, exit_code=0, exception=None, run_command_fn=None, stderr=''):
+ def make_config(self, output='', files=None, exit_code=0, exception=None, run_command_fn=None, stderr='', port_implementation=None):
e = MockExecutive2(output=output, exit_code=exit_code, exception=exception, run_command_fn=run_command_fn, stderr=stderr)
fs = MockFileSystem(files)
- return config.Config(e, fs)
+ return config.Config(e, fs, port_implementation=port_implementation)
def assert_configuration(self, contents, expected):
# This tests that a configuration file containing
@@ -91,6 +91,13 @@
c = self.make_config(output='/WebKitBuild/', stderr="mock stderr output from webkit-build-directory")
self.assertEqual(c.build_directory(None), '/WebKitBuild/')
+ def test_build_directory_passes_port_implementation(self):
+ def mock_run_command(arg_list):
+ self.assetEquals('--gtk' in arg_list)
+ return '/tmp'
+
+ c = self.make_config(run_command_fn=mock_run_command, port_implementation='gtk')
+
def test_default_configuration__release(self):
self.assert_configuration('Release', 'Release')