Title: [118408] trunk/Tools
Revision
118408
Author
[email protected]
Date
2012-05-24 13:08:59 -0700 (Thu, 24 May 2012)

Log Message

Add --driver-name option to run_webkit_tests.py to allow for selecting alternative DRT binaries
https://bugs.webkit.org/show_bug.cgi?id=87128

Reviewed by Dirk Pranke.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.driver_name):
* Scripts/webkitpy/layout_tests/port/chromium_linux.py:
(ChromiumLinuxPort._path_to_driver):
* Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
(ChromiumPortTest.test_driver_name_option):
* Scripts/webkitpy/layout_tests/port/chromium_win.py:
(ChromiumWinPort._path_to_driver):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (118407 => 118408)


--- trunk/Tools/ChangeLog	2012-05-24 20:01:53 UTC (rev 118407)
+++ trunk/Tools/ChangeLog	2012-05-24 20:08:59 UTC (rev 118408)
@@ -1,3 +1,21 @@
+2012-05-24  Jochen Eisinger  <[email protected]>
+
+        Add --driver-name option to run_webkit_tests.py to allow for selecting alternative DRT binaries
+        https://bugs.webkit.org/show_bug.cgi?id=87128
+
+        Reviewed by Dirk Pranke.
+
+        * Scripts/webkitpy/layout_tests/port/base.py:
+        (Port.driver_name):
+        * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
+        (ChromiumLinuxPort._path_to_driver):
+        * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
+        (ChromiumPortTest.test_driver_name_option):
+        * Scripts/webkitpy/layout_tests/port/chromium_win.py:
+        (ChromiumWinPort._path_to_driver):
+        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+        (parse_args):
+
 2012-05-24  John Mellor  <[email protected]>
 
         Font Boosting: Add compile flag and runtime setting

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


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py	2012-05-24 20:01:53 UTC (rev 118407)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py	2012-05-24 20:08:59 UTC (rev 118408)
@@ -304,7 +304,9 @@
 
     def driver_name(self):
         # FIXME: Seems we should get this from the Port's Driver class.
-        return "DumpRenderTree"
+        if self.get_option('driver_name'):
+            return self.get_option('driver_name')
+        return 'DumpRenderTree'
 
     def expected_baselines_by_extension(self, test_name):
         """Returns a dict mapping baseline suffix to relative path for each baseline in

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py (118407 => 118408)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py	2012-05-24 20:01:53 UTC (rev 118407)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py	2012-05-24 20:08:59 UTC (rev 118408)
@@ -192,7 +192,7 @@
     def _path_to_driver(self, configuration=None):
         if not configuration:
             configuration = self.get_option('configuration')
-        binary_name = 'DumpRenderTree'
+        binary_name = self.driver_name()
         return self._build_path(configuration, binary_name)
 
     def _path_to_helper(self):

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py (118407 => 118408)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py	2012-05-24 20:01:53 UTC (rev 118407)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py	2012-05-24 20:08:59 UTC (rev 118408)
@@ -330,7 +330,17 @@
         self.assertEquals(port.test_expectations_overrides(),
                           SKIA_OVERRIDES + ADDITIONAL_EXPECTATIONS)
 
+    def test_driver_name_option(self):
+        self.assertTrue(ChromiumPortTest.TestLinuxPort()._path_to_driver().endswith('/out/default/DumpRenderTree'))
+        self.assertTrue(ChromiumPortTest.TestMacPort()._path_to_driver().endswith('/xcodebuild/default/DumpRenderTree.app/Contents/MacOS/DumpRenderTree'))
+        self.assertTrue(ChromiumPortTest.TestWinPort()._path_to_driver().endswith('/default/DumpRenderTree.exe'))
 
+        options = MockOptions(driver_name='OtherDriver')
+        self.assertTrue(ChromiumPortTest.TestLinuxPort(options)._path_to_driver().endswith('/out/default/OtherDriver'))
+        self.assertTrue(ChromiumPortTest.TestMacPort(options)._path_to_driver().endswith('/xcodebuild/default/OtherDriver.app/Contents/MacOS/OtherDriver'))
+        self.assertTrue(ChromiumPortTest.TestWinPort(options)._path_to_driver().endswith('/default/OtherDriver.exe'))
+
+
 class ChromiumPortLoggingTest(logtesting.LoggingTestCase):
     def test_check_sys_deps(self):
         port = ChromiumPortTest.TestLinuxPort()

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py (118407 => 118408)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py	2012-05-24 20:01:53 UTC (rev 118407)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py	2012-05-24 20:08:59 UTC (rev 118408)
@@ -161,7 +161,7 @@
     def _path_to_driver(self, configuration=None):
         if not configuration:
             configuration = self.get_option('configuration')
-        binary_name = 'DumpRenderTree.exe'
+        binary_name = '%s.exe' % self.driver_name()
         return self._build_path(configuration, binary_name)
 
     def _path_to_helper(self):

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py (118407 => 118408)


--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py	2012-05-24 20:01:53 UTC (rev 118407)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py	2012-05-24 20:08:59 UTC (rev 118408)
@@ -297,6 +297,8 @@
         optparse.make_option("--additional-drt-flag", action=""
             default=[], help="Additional command line flag to pass to DumpRenderTree "
                  "Specify multiple times to add multiple flags."),
+        optparse.make_option("--driver-name", type="string",
+            help="Alternative DumpRenderTree binary to use"),
         optparse.make_option("--additional-platform-directory", action=""
             default=[], help="Additional directory where to look for test "
                  "baselines (will take precendence over platform baselines). "
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to