Title: [124957] trunk/Tools
- Revision
- 124957
- Author
- [email protected]
- Date
- 2012-08-07 18:06:45 -0700 (Tue, 07 Aug 2012)
Log Message
nrwt: --no-build isn't working
https://bugs.webkit.org/show_bug.cgi?id=93415
Reviewed by Ryosuke Niwa.
Turns out our optimization to avoid calling
webkit-build-directory N times for each worker broke --no-build.
Fixing, and adding a test.
Also, the gtk port wasn't using the default check_build() logic,
but I don't know why not. Removing their custom hook and will
verify that this is okay in the review ...
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.__init__):
(Port.check_build):
(Port._build_path):
* Scripts/webkitpy/layout_tests/port/gtk.py:
(GtkPort._path_to_image_diff):
* Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
(MockDRTPortTest.test_check_build):
* Scripts/webkitpy/layout_tests/port/port_testcase.py:
(test_path_to_apache_config_file):
(test_check_build):
(test_check_build.build_driver_called):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (124956 => 124957)
--- trunk/Tools/ChangeLog 2012-08-08 01:06:44 UTC (rev 124956)
+++ trunk/Tools/ChangeLog 2012-08-08 01:06:45 UTC (rev 124957)
@@ -1,3 +1,32 @@
+2012-08-07 Dirk Pranke <[email protected]>
+
+ nrwt: --no-build isn't working
+ https://bugs.webkit.org/show_bug.cgi?id=93415
+
+ Reviewed by Ryosuke Niwa.
+
+ Turns out our optimization to avoid calling
+ webkit-build-directory N times for each worker broke --no-build.
+
+ Fixing, and adding a test.
+
+ Also, the gtk port wasn't using the default check_build() logic,
+ but I don't know why not. Removing their custom hook and will
+ verify that this is okay in the review ...
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.__init__):
+ (Port.check_build):
+ (Port._build_path):
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort._path_to_image_diff):
+ * Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
+ (MockDRTPortTest.test_check_build):
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ (test_path_to_apache_config_file):
+ (test_check_build):
+ (test_check_build.build_driver_called):
+
2012-08-07 Ryosuke Niwa <[email protected]>
run-perf-tests should support --no-show-results
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py (124956 => 124957)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-08-08 01:06:44 UTC (rev 124956)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-08-08 01:06:45 UTC (rev 124957)
@@ -142,6 +142,7 @@
self._test_configuration = None
self._reftest_list = {}
self._results_directory = None
+ self._root_was_set = hasattr(options, 'root') and options.root
def additional_drt_flag(self):
return []
@@ -214,7 +215,7 @@
"""This routine is used to ensure that the build is up to date
and all the needed binaries are present."""
# If we're using a pre-built copy of WebKit (--root), we assume it also includes a build of DRT.
- if not self.get_option('root') and self.get_option('build') and not self._build_driver():
+ if not self._root_was_set and self.get_option('build') and not self._build_driver():
return False
if not self._check_driver():
return False
@@ -1167,6 +1168,8 @@
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)
return self._filesystem.join(self._filesystem.abspath(root_directory), *comps)
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py (124956 => 124957)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py 2012-08-08 01:06:44 UTC (rev 124956)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py 2012-08-08 01:06:45 UTC (rev 124957)
@@ -82,9 +82,6 @@
def _path_to_image_diff(self):
return self._build_path('Programs', 'ImageDiff')
- def check_build(self, needs_http):
- return self._check_driver()
-
def _path_to_apache(self):
if self._is_redhat_based():
return '/usr/sbin/httpd'
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py (124956 => 124957)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py 2012-08-08 01:06:44 UTC (rev 124956)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py 2012-08-08 01:06:45 UTC (rev 124957)
@@ -87,6 +87,10 @@
def test_get_crash_log(self):
pass
+ def test_check_build(self):
+ pass
+
+
class MockDRTTest(unittest.TestCase):
def input_line(self, port, test_name, checksum=None):
url = ""
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py (124956 => 124957)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py 2012-08-08 01:06:44 UTC (rev 124956)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py 2012-08-08 01:06:45 UTC (rev 124957)
@@ -569,3 +569,27 @@
# Mock out _apache_config_file_name_for_platform to ignore the passed sys.platform value.
port._apache_config_file_name_for_platform = lambda platform: 'httpd.conf'
self.assertEquals(port._path_to_apache_config_file(), '/mock-checkout/LayoutTests/http/conf/httpd.conf')
+
+ def test_check_build(self):
+ port = self.make_port(options=MockOptions(build=True))
+ self.build_called = False
+
+ def build_driver_called():
+ self.build_called = True
+ return True
+
+ port._build_driver = build_driver_called
+ port.check_build(False)
+ self.assertTrue(self.build_called)
+
+ port = self.make_port(options=MockOptions(root='/tmp', build=True))
+ self.build_called = False
+ port._build_driver = build_driver_called
+ port.check_build(False)
+ self.assertFalse(self.build_called, None)
+
+ port = self.make_port(options=MockOptions(build=False))
+ self.build_called = False
+ port._build_driver = build_driver_called
+ port.check_build(False)
+ self.assertFalse(self.build_called, None)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes