Title: [192087] trunk/Tools
- Revision
- 192087
- Author
- [email protected]
- Date
- 2015-11-05 16:06:56 -0800 (Thu, 05 Nov 2015)
Log Message
run-webkit-test should look in --root directory for LayoutTestRelay
https://bugs.webkit.org/show_bug.cgi?id=150859
Reviewed by Daniel Bates.
For iOS run-webkit-tests, use LayoutTestRelay specified by --root; otherwise find
LayoutTestRelay in the Mac build directory when --root is unspecified.
* Scripts/webkitpy/port/base.py:
(Port._build_path): Use '_cached_root' instead of 'root' so that we don't overwrite the
argument that was passed in via the --root argument.
* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.relay_path):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (192086 => 192087)
--- trunk/Tools/ChangeLog 2015-11-06 00:03:59 UTC (rev 192086)
+++ trunk/Tools/ChangeLog 2015-11-06 00:06:56 UTC (rev 192087)
@@ -1,3 +1,19 @@
+2015-11-05 Jason Marcell <[email protected]>
+
+ run-webkit-test should look in --root directory for LayoutTestRelay
+ https://bugs.webkit.org/show_bug.cgi?id=150859
+
+ Reviewed by Daniel Bates.
+
+ For iOS run-webkit-tests, use LayoutTestRelay specified by --root; otherwise find
+ LayoutTestRelay in the Mac build directory when --root is unspecified.
+
+ * Scripts/webkitpy/port/base.py:
+ (Port._build_path): Use '_cached_root' instead of 'root' so that we don't overwrite the
+ argument that was passed in via the --root argument.
+ * Scripts/webkitpy/port/ios.py:
+ (IOSSimulatorPort.relay_path):
+
2015-11-05 David Kilzer <[email protected]>
TestWebKitAPI crashed in TestWebKitAPI: TestWebKitAPI::SharedBufferTest_copyBufferCreatedWithContentsOfExistingFile_Test::TestBody
Modified: trunk/Tools/Scripts/webkitpy/port/base.py (192086 => 192087)
--- trunk/Tools/Scripts/webkitpy/port/base.py 2015-11-06 00:03:59 UTC (rev 192086)
+++ trunk/Tools/Scripts/webkitpy/port/base.py 2015-11-06 00:06:56 UTC (rev 192087)
@@ -1133,18 +1133,22 @@
return self._filesystem.join(self.layout_tests_dir(), 'http', 'conf', config_file_name)
def _build_path(self, *comps):
- root_directory = self.get_option('root')
+ root_directory = self.get_option('_cached_root') or self.get_option('root')
if not root_directory:
build_directory = self.get_option('build_directory')
if build_directory:
root_directory = self._filesystem.join(build_directory, self.get_option('configuration'))
else:
root_directory = self._config.build_directory(self.get_option('configuration'))
- # Set --root so that we can pass this to subprocesses and avoid making the
- # slow call to config.build_directory() N times in each worker.
- # FIXME: This is like @memoized, but more annoying and fragile; there should be another
- # way to propagate values without mutating the options list.
- self.set_option_default('root', root_directory)
+ # We take advantage of the behavior that self._options is passed by reference to worker
+ # subprocesses to use it as data store to cache the computed root directory path. This
+ # avoids making each worker subprocess compute this path again which is slow because of
+ # the call to config.build_directory().
+ #
+ # FIXME: This is like decorating this function with @memoized, but more annoying and fragile;
+ # there should be another way to propagate precomputed values to workers without modifying
+ # the options list.
+ self.set_option('_cached_root', root_directory)
return self._filesystem.join(self._filesystem.abspath(root_directory), *comps)
def _path_to_driver(self, configuration=None):
Modified: trunk/Tools/Scripts/webkitpy/port/ios.py (192086 => 192087)
--- trunk/Tools/Scripts/webkitpy/port/ios.py 2015-11-06 00:03:59 UTC (rev 192086)
+++ trunk/Tools/Scripts/webkitpy/port/ios.py 2015-11-06 00:06:56 UTC (rev 192087)
@@ -123,8 +123,12 @@
@property
@memoized
def relay_path(self):
- mac_config = port_config.Config(self._executive, self._filesystem, 'mac')
- return self._filesystem.join(mac_config.build_directory(self.get_option('configuration')), self.relay_name)
+ if self._root_was_set:
+ path = self._filesystem.abspath(self.get_option('root'))
+ else:
+ mac_config = port_config.Config(self._executive, self._filesystem, 'mac')
+ path = mac_config.build_directory(self.get_option('configuration'))
+ return self._filesystem.join(path, self.relay_name)
def default_timeout_ms(self):
if self.get_option('guard_malloc'):
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes