Title: [98279] trunk/Tools
Revision
98279
Author
[email protected]
Date
2011-10-24 13:54:14 -0700 (Mon, 24 Oct 2011)

Log Message

NRWT doesn't support ORWT's --root option, but should
https://bugs.webkit.org/show_bug.cgi?id=70416

Reviewed by Dirk Pranke.

Add support for ORWT's --root option which is used for
running tests with a nightly build of WebKit.

* Scripts/old-run-webkit-tests:
* Scripts/webkitpy/layout_tests/port/base.py:
 - webkit_build_path was never called by any code, removed.
* Scripts/webkitpy/layout_tests/port/webkit.py:
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (98278 => 98279)


--- trunk/Tools/ChangeLog	2011-10-24 20:51:02 UTC (rev 98278)
+++ trunk/Tools/ChangeLog	2011-10-24 20:54:14 UTC (rev 98279)
@@ -1,3 +1,19 @@
+2011-10-24  Eric Seidel  <[email protected]>
+
+        NRWT doesn't support ORWT's --root option, but should
+        https://bugs.webkit.org/show_bug.cgi?id=70416
+
+        Reviewed by Dirk Pranke.
+
+        Add support for ORWT's --root option which is used for
+        running tests with a nightly build of WebKit.
+
+        * Scripts/old-run-webkit-tests:
+        * Scripts/webkitpy/layout_tests/port/base.py:
+         - webkit_build_path was never called by any code, removed.
+        * Scripts/webkitpy/layout_tests/port/webkit.py:
+        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+
 2011-10-24  David Levin  <[email protected]>
 
         check-webkit-style complains about WEBKIT_EXPORT in test/WebUnitTests.h

Modified: trunk/Tools/Scripts/old-run-webkit-tests (98278 => 98279)


--- trunk/Tools/Scripts/old-run-webkit-tests	2011-10-24 20:51:02 UTC (rev 98278)
+++ trunk/Tools/Scripts/old-run-webkit-tests	2011-10-24 20:54:14 UTC (rev 98279)
@@ -440,7 +440,7 @@
 
 if (!defined($root) && !$noBuildDumpTool) {
     # FIXME: We build both DumpRenderTree and WebKitTestRunner for
-    # WebKitTestRunner runs becuase DumpRenderTree still includes
+    # WebKitTestRunner runs because DumpRenderTree still includes
     # the DumpRenderTreeSupport module and the TestNetscapePlugin.
     # These two projects should be factored out into their own
     # projects.

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py (98278 => 98279)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py	2011-10-24 20:51:02 UTC (rev 98278)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py	2011-10-24 20:54:14 UTC (rev 98279)
@@ -885,8 +885,6 @@
     # The routines below should only be called by routines in this class
     # or any of its subclasses.
     #
-    def _webkit_build_directory(self, args):
-        return self._config.build_directory(args[0])
 
     def _uses_apache(self):
         return True

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py (98278 => 98279)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py	2011-10-24 20:51:02 UTC (rev 98278)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py	2011-10-24 20:54:14 UTC (rev 98279)
@@ -125,7 +125,8 @@
         return True
 
     def check_build(self, needs_http):
-        if self.get_option('build') and not self._build_driver():
+        # 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():
             return False
         if not self._check_driver():
             return False
@@ -364,8 +365,11 @@
         return tests_to_skip
 
     def _build_path(self, *comps):
-        return self._filesystem.join(self._config.build_directory(
-            self.get_option('configuration')), *comps)
+        # --root is used for running with a pre-built root (like from a nightly zip).
+        build_directory = self.get_option('root')
+        if not build_directory:
+            build_directory = self._config.build_directory(self.get_option('configuration'))
+        return self._filesystem.join(build_directory, *comps)
 
     def _path_to_driver(self):
         return self._build_path(self.driver_name())

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit_unittest.py (98278 => 98279)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit_unittest.py	2011-10-24 20:51:02 UTC (rev 98278)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit_unittest.py	2011-10-24 20:54:14 UTC (rev 98279)
@@ -125,6 +125,11 @@
         port._options = MockOptions(webkit_test_runner=True)
         self.assertEqual(port._skipped_file_search_paths(), set(['testwebkitport', 'testwebkitport-version', 'testwebkitport-wk2', 'wk2']))
 
+    def test_root_option(self):
+        port = TestWebKitPort()
+        port._options = MockOptions(root='/foo')
+        self.assertEqual(port._path_to_driver(), "/foo/DumpRenderTree")
+
     def test_test_expectations(self):
         # Check that we read both the expectations file and anything in a
         # Skipped file, and that we include the feature and platform checks.

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py (98278 => 98279)


--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py	2011-10-24 20:51:02 UTC (rev 98278)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py	2011-10-24 20:54:14 UTC (rev 98279)
@@ -252,6 +252,8 @@
             help="Run a concurrent _javascript_ thread with each test"),
         optparse.make_option("--webkit-test-runner", "-2", action=""
             help="Use WebKitTestRunner rather than DumpRenderTree."),
+        optparse.make_option("--root", action=""
+            help="Path to a pre-built root of WebKit (for running tests using a nightly build of WebKit)"),
     ]
 
     old_run_webkit_tests_compat = [
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to