2010-11-24 Dirk Pranke <dpranke@chromium.org>
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Nov 2010 00:56:31 +0000 (00:56 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Nov 2010 00:56:31 +0000 (00:56 +0000)
        Reviewed by Tony Chang.

        nrwt - clean up create_driver interface and print out the
        command line used for DumpRenderTree/TestShell.

        This patch adds a driver_cmd_line() call to the Port class in
        order to retrive the command line to print it out (as part of
        --print config).

        In addition, this patch cleans up the Port.create_driver()
        signature and the Driver constructor interface to take a worker
        number and no longer require the image_path argument (Chromium's
        drivers now synthesize the image_path from the worker number
        internally).

        https://bugs.webkit.org/show_bug.cgi?id=49934

        * Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py:
        * Scripts/webkitpy/layout_tests/layout_package/printing.py:
        * Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py:
        * Scripts/webkitpy/layout_tests/port/base.py:
        * Scripts/webkitpy/layout_tests/port/base_unittest.py:
        * Scripts/webkitpy/layout_tests/port/chromium.py:
        * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
        * Scripts/webkitpy/layout_tests/port/dryrun.py:
        * Scripts/webkitpy/layout_tests/port/port_testcase.py:
        * Scripts/webkitpy/layout_tests/port/test.py:
        * Scripts/webkitpy/layout_tests/port/webkit.py:
        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
        * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72708 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
WebKitTools/ChangeLog
WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing.py
WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py
WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
WebKitTools/Scripts/webkitpy/layout_tests/port/base_unittest.py
WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py
WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py
WebKitTools/Scripts/webkitpy/layout_tests/port/dryrun.py
WebKitTools/Scripts/webkitpy/layout_tests/port/port_testcase.py
WebKitTools/Scripts/webkitpy/layout_tests/port/test.py
WebKitTools/Scripts/webkitpy/layout_tests/port/webkit.py
WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py

index 1eb7b3559fe2c5241454ed7e788e1bd290a02bb3..1ac24d02700350f68b6e3ff9512d149b1b9a3648 100644 (file)
@@ -1,3 +1,36 @@
+2010-11-24  Dirk Pranke  <dpranke@chromium.org>
+
+        Reviewed by Tony Chang.
+
+        nrwt - clean up create_driver interface and print out the
+        command line used for DumpRenderTree/TestShell.
+
+        This patch adds a driver_cmd_line() call to the Port class in
+        order to retrive the command line to print it out (as part of
+        --print config).
+
+        In addition, this patch cleans up the Port.create_driver()
+        signature and the Driver constructor interface to take a worker
+        number and no longer require the image_path argument (Chromium's
+        drivers now synthesize the image_path from the worker number
+        internally).
+
+        https://bugs.webkit.org/show_bug.cgi?id=49934
+
+        * Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py:
+        * Scripts/webkitpy/layout_tests/layout_package/printing.py:
+        * Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py:
+        * Scripts/webkitpy/layout_tests/port/base.py:
+        * Scripts/webkitpy/layout_tests/port/base_unittest.py:
+        * Scripts/webkitpy/layout_tests/port/chromium.py:
+        * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
+        * Scripts/webkitpy/layout_tests/port/dryrun.py:
+        * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+        * Scripts/webkitpy/layout_tests/port/test.py:
+        * Scripts/webkitpy/layout_tests/port/webkit.py:
+        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+        * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
 2010-11-24  Ojan Vafai  <ojan@chromium.org>
 
         Reviewed by Tony Chang.
index 38cf6c352377b396c0c9591e7a5b5b9745d7a87a..fdb8da6cc80b73ee7dfb7d61d9dbbcbbabbcb478 100644 (file)
@@ -171,7 +171,6 @@ class SingleTestThread(threading.Thread):
           port: object implementing port-specific hooks
           options: command line argument object from optparse
           worker_number: worker number for tests
-              (FIXME: this should be passed to port.create_driver()).
           worker_name: for logging
           test_input: Object containing the test filename and timeout
           test_types: A list of TestType objects to run the test output
@@ -195,8 +194,7 @@ class SingleTestThread(threading.Thread):
     def _covered_run(self):
         # FIXME: this is a separate routine to work around a bug
         # in coverage: see http://bitbucket.org/ned/coveragepy/issue/85.
-        self._driver = self._port.create_driver(self._test_args.png_path,
-                                                self._options)
+        self._driver = self._port.create_driver(self._worker_number)
         self._driver.start()
         self._test_result = _run_single_test(self._port, self._options,
                                              self._test_input, self._test_types,
@@ -292,12 +290,6 @@ class TestShellThread(WatchableThread):
     def _get_test_args(self, worker_number):
         """Returns the tuple of arguments for tests and for DumpRenderTree."""
         test_args = test_type_base.TestArguments()
-        test_args.png_path = None
-        if self._options.pixel_tests:
-            png_path = os.path.join(self._options.results_directory,
-                                    "png_result%s.png" %
-                                    self._worker_number)
-            test_args.png_path = png_path
         test_args.new_baseline = self._options.new_baseline
         test_args.reset_results = self._options.reset_results
 
@@ -543,9 +535,8 @@ class TestShellThread(WatchableThread):
         """
         # poll() is not threadsafe and can throw OSError due to:
         # http://bugs.python.org/issue1731717
-        if (not self._driver or self._driver.poll() is not None):
-            self._driver = self._port.create_driver(self._test_args.png_path,
-                                                    self._options)
+        if not self._driver or self._driver.poll() is not None:
+            self._driver = self._port.create_driver(self._worker_number)
             self._driver.start()
 
     def _start_servers_with_lock(self):
index 3486c347a29857e63ed2e2c33d575563ef86a601..7a6aad1a43189aa00d2e2db61a0df049e719f0f8 100644 (file)
@@ -126,7 +126,6 @@ def print_options():
     ]
 
 
-
 def parse_print_options(print_options, verbose, child_processes,
                         is_fully_parallel):
     """Parse the options provided to --print and dedup and rank them.
index 9a0f4eea208d21cf88ef8d5eeaf1483a511618e3..27a6a29be5c9a7a3f073f00e630c5b045276dbc0 100644 (file)
@@ -78,8 +78,9 @@ class TestUtilityFunctions(unittest.TestCase):
         self.assertTrue(options is not None)
 
     def test_parse_print_options(self):
-        def test_switches(args, verbose, child_processes, is_fully_parallel,
-                          expected_switches_str):
+        def test_switches(args, expected_switches_str,
+                          verbose=False, child_processes=1,
+                          is_fully_parallel=False):
             options, args = get_options(args)
             if expected_switches_str:
                 expected_switches = set(expected_switches_str.split(','))
@@ -92,28 +93,23 @@ class TestUtilityFunctions(unittest.TestCase):
             self.assertEqual(expected_switches, switches)
 
         # test that we default to the default set of switches
-        test_switches([], False, 1, False,
-                      printing.PRINT_DEFAULT)
+        test_switches([], printing.PRINT_DEFAULT)
 
         # test that verbose defaults to everything
-        test_switches([], True, 1, False,
-                      printing.PRINT_EVERYTHING)
+        test_switches([], printing.PRINT_EVERYTHING, verbose=True)
 
         # test that --print default does what it's supposed to
-        test_switches(['--print', 'default'], False, 1, False,
-                      printing.PRINT_DEFAULT)
+        test_switches(['--print', 'default'], printing.PRINT_DEFAULT)
 
         # test that --print nothing does what it's supposed to
-        test_switches(['--print', 'nothing'], False, 1, False,
-                      None)
+        test_switches(['--print', 'nothing'], None)
 
         # test that --print everything does what it's supposed to
-        test_switches(['--print', 'everything'], False, 1, False,
-                      printing.PRINT_EVERYTHING)
+        test_switches(['--print', 'everything'], printing.PRINT_EVERYTHING)
 
         # this tests that '--print X' overrides '--verbose'
-        test_switches(['--print', 'actual'], True, 1, False,
-                      'actual')
+        test_switches(['--print', 'actual'], 'actual', verbose=True)
+
 
 
 class  Testprinter(unittest.TestCase):
index 3fb0d8ec7677fc53bdaad1cf314e376a82bef4f2..757318d13805bc7da9a77f38302c55018e0a2bb6 100644 (file)
@@ -384,6 +384,11 @@ class Port(object):
         # valid test and by printing.py to determine if baselines exist.
         return self._filesystem.exists(path)
 
+    def driver_cmd_line(self):
+        """Prints the DRT command line that will be used."""
+        driver = self.create_driver(0)
+        return driver.cmd_line()
+
     def update_baseline(self, path, data, encoding):
         """Updates the baseline for a test.
 
@@ -511,7 +516,7 @@ class Port(object):
         results_filename in a users' browser."""
         return self._user.open_url(results_filename)
 
-    def create_driver(self, image_path, options):
+    def create_driver(self, worker_number):
         """Return a newly created base.Driver subclass for starting/stopping
         the test driver."""
         raise NotImplementedError('Port.create_driver')
@@ -741,7 +746,7 @@ class Port(object):
 
     def _path_to_driver(self, configuration=None):
         """Returns the full path to the test driver (DumpRenderTree)."""
-        raise NotImplementedError('Port.path_to_driver')
+        raise NotImplementedError('Port._path_to_driver')
 
     def _path_to_webcore_library(self):
         """Returns the full path to a built copy of WebCore."""
@@ -804,19 +809,14 @@ class Port(object):
 class Driver:
     """Abstract interface for the DumpRenderTree interface."""
 
-    def __init__(self, port, png_path, options, executive):
+    def __init__(self, port, worker_number):
         """Initialize a Driver to subsequently run tests.
 
         Typically this routine will spawn DumpRenderTree in a config
         ready for subsequent input.
 
         port - reference back to the port object.
-        png_path - an absolute path for the driver to write any image
-            data for a test (as a PNG). If no path is provided, that
-            indicates that pixel test results will not be checked.
-        options - command line options argument from optparse
-        executive - reference to the process-wide Executive object
-
+        worker_number - identifier for a particular worker/driver instance
         """
         raise NotImplementedError('Driver.__init__')
 
index 22709eabdf82fb884954fdb9ad5f63f97a8c6d00..8d586e354e42f0393c6c96fbbe10760bd37185ee 100644 (file)
@@ -258,7 +258,7 @@ class VirtualTest(unittest.TestCase):
         self.assertVirtual(port.baseline_search_path)
         self.assertVirtual(port.check_build, None)
         self.assertVirtual(port.check_image_diff)
-        self.assertVirtual(port.create_driver, None, None)
+        self.assertVirtual(port.create_driver, 0)
         self.assertVirtual(port.diff_image, None, None)
         self.assertVirtual(port.path_to_test_expectations_file)
         self.assertVirtual(port.test_platform_name)
@@ -282,7 +282,7 @@ class VirtualTest(unittest.TestCase):
 
     def test_virtual_driver_method(self):
         self.assertRaises(NotImplementedError, base.Driver, base.Port(),
-                          "", None, None)
+                          0)
 
     def test_virtual_driver_methods(self):
         class VirtualDriver(base.Driver):
index 25c18cb216f73d6a63bdc9cd38d82449adbba08c..8fe685af0669eb34afe8f94c56fe3ff3cd9536c7 100644 (file)
@@ -44,7 +44,6 @@ import tempfile
 import time
 import webbrowser
 
-from webkitpy.common.system.executive import Executive
 from webkitpy.common.system.path import cygpath
 from webkitpy.layout_tests.layout_package import test_expectations
 from webkitpy.layout_tests.layout_package import test_output
@@ -176,6 +175,8 @@ class ChromiumPort(base.Port):
         return result
 
     def driver_name(self):
+        if self._options.use_drt:
+            return "DumpRenderTree"
         return "test_shell"
 
     def path_from_chromium_base(self, *comps):
@@ -213,13 +214,11 @@ class ChromiumPort(base.Port):
         if os.path.exists(cachedir):
             shutil.rmtree(cachedir)
 
-    def create_driver(self, image_path, options):
+    def create_driver(self, worker_number):
         """Starts a new Driver and returns a handle to it."""
-        if options.use_drt and sys.platform == 'darwin':
-            return webkit.WebKitDriver(self, image_path, options,
-                                       executive=self._executive)
-        return ChromiumDriver(self, image_path, options,
-                              executive=self._executive)
+        if self.get_option('use_drt') and sys.platform == 'darwin':
+            return webkit.WebKitDriver(self, worker_number)
+        return ChromiumDriver(self, worker_number)
 
     def start_helper(self):
         helper_path = self._path_to_helper()
@@ -360,48 +359,50 @@ class ChromiumPort(base.Port):
 class ChromiumDriver(base.Driver):
     """Abstract interface for test_shell."""
 
-    def __init__(self, port, image_path, options, executive=Executive()):
+    def __init__(self, port, worker_number):
         self._port = port
-        self._options = options
-        self._image_path = image_path
-        self._executive = executive
-
-    def _driver_args(self):
-        driver_args = []
-        if self._image_path:
+        self._worker_number = worker_number
+        self._image_path = None
+        if self._port.get_option('pixel_tests'):
+            self._image_path = os.path.join(
+                self._port.get_option('results_directory'),
+                'png_result%s.png' % self._worker_number)
+
+    def cmd_line(self):
+        cmd = self._command_wrapper(self._port.get_option('wrapper'))
+        cmd.append(self._port._path_to_driver())
+        if self._port.get_option('pixel_tests'):
             # See note above in diff_image() for why we need _convert_path().
-            driver_args.append("--pixel-tests=" +
-                               self._port._convert_path(self._image_path))
+            cmd.append("--pixel-tests=" +
+                       self._port._convert_path(self._image_path))
 
         if self._port.get_option('use_drt'):
-            driver_args.append('--test-shell')
+            cmd.append('--test-shell')
         else:
-            driver_args.append('--layout-tests')
+            cmd.append('--layout-tests')
 
         if self._port.get_option('startup_dialog'):
-            driver_args.append('--testshell-startup-dialog')
+            cmd.append('--testshell-startup-dialog')
 
         if self._port.get_option('gp_fault_error_box'):
-            driver_args.append('--gp-fault-error-box')
+            cmd.append('--gp-fault-error-box')
 
-        if self._options.js_flags is not None:
-            driver_args.append('--js-flags="' + self._options.js_flags + '"')
+        if self._port.get_option('js_flags') is not None:
+            cmd.append('--js-flags="' + self._port.get_option('js_flags') + '"')
 
-        if self._options.multiple_loads is not None and self._options.multiple_loads > 0:
-            driver_args.append('--multiple-loads=' + str(self._options.multiple_loads))
+        if self._port.get_option('multiple_loads') > 0:
+            cmd.append('--multiple-loads=' + str(self._port.get_option('multiple_loads')))
 
         if self._port.get_option('accelerated_compositing'):
-            driver_args.append('--enable-accelerated-compositing')
+            cmd.append('--enable-accelerated-compositing')
 
         if self._port.get_option('accelerated_2d_canvas'):
-            driver_args.append('--enable-accelerated-2d-canvas')
-        return driver_args
+            cmd.append('--enable-accelerated-2d-canvas')
+        return cmd
 
     def start(self):
         # FIXME: Should be an error to call this method twice.
-        cmd = self._command_wrapper(self._port.get_option('wrapper'))
-        cmd.append(self._port._path_to_driver())
-        cmd += self._driver_args()
+        cmd = self.cmd_line()
 
         # We need to pass close_fds=True to work around Python bug #2320
         # (otherwise we can hang when we kill DumpRenderTree when we are running
@@ -551,4 +552,4 @@ class ChromiumDriver(base.Driver):
                 if self._proc.poll() is None:
                     _log.warning('stopping test driver timed out, '
                                  'killing it')
-                    self._executive.kill_process(self._proc.pid)
+                    self._port._executive.kill_process(self._proc.pid)
index 92a31fbe46293a9bc52c5c59437140adf730f8a0..53965220ff2a3ad940d1fc19032a3ca9c0894f5a 100644 (file)
@@ -42,7 +42,8 @@ class ChromiumDriverTest(unittest.TestCase):
 
     def setUp(self):
         mock_port = Mock()
-        self.driver = chromium.ChromiumDriver(mock_port, image_path=None, options=None)
+        mock_port.get_option = lambda option_name: ''
+        self.driver = chromium.ChromiumDriver(mock_port, worker_number=0)
 
     def test_test_shell_command(self):
         expected_command = "test.html 2 checksum\n"
index d444dab123142dde13de0a711f63319dd6165032..4ed34e6488ef284750c69fd054d03100beed5b6f 100644 (file)
@@ -95,18 +95,19 @@ class DryRunPort(object):
     def stop_websocket_server(self):
         pass
 
-    def create_driver(self, image_path, options):
-        return DryrunDriver(self, image_path, options, executive=None)
+    def create_driver(self, worker_number):
+        return DryrunDriver(self, worker_number)
 
 
 class DryrunDriver(base.Driver):
     """Dryrun implementation of the DumpRenderTree / Driver interface."""
 
-    def __init__(self, port, image_path, options, executive):
+    def __init__(self, port, worker_number):
         self._port = port
-        self._image_path = image_path
-        self._executive = executive
-        self._layout_tests_dir = None
+        self._worker_number = worker_number
+
+    def cmd_line(self):
+        return ['None']
 
     def poll(self):
         return None
index 04ada5000e3b35382c3c960922e28c553c3f404e..c4b36acd9079fd2fbe90901202d5f9c025e387e5 100644 (file)
@@ -37,6 +37,8 @@ mock_options = mocktool.MockOptions(results_directory='layout-test-results',
                                     use_apache=True,
                                     configuration='Release')
 
+# FIXME: This should be used for all ports, not just WebKit Mac. See
+# https://bugs.webkit.org/show_bug.cgi?id=50043 .
 
 class PortTestCase(unittest.TestCase):
     """Tests the WebKit port implementation."""
@@ -44,6 +46,12 @@ class PortTestCase(unittest.TestCase):
         """Override in subclass."""
         raise NotImplementedError()
 
+    def test_driver_cmd_line(self):
+        port = self.make_port()
+        if not port:
+            return
+        self.assertTrue(len(port.driver_cmd_line()))
+
     def test_http_server(self):
         port = self.make_port()
         if not port:
index dd8f618a8ea9ecdd2f61514ae0c03a16c1a66c52..8e27f35c1c1ad8ad7b30941d1cb2463fade9d6f8 100644 (file)
@@ -226,8 +226,8 @@ class TestPort(base.Port):
     def setup_test_run(self):
         pass
 
-    def create_driver(self, image_path, options):
-        return TestDriver(self, image_path, options, executive=None)
+    def create_driver(self, worker_number):
+        return TestDriver(self, worker_number)
 
     def start_http_server(self):
         pass
@@ -281,11 +281,11 @@ WONTFIX SKIP : failures/expected/exception.html = CRASH
 class TestDriver(base.Driver):
     """Test/Dummy implementation of the DumpRenderTree interface."""
 
-    def __init__(self, port, image_path, options, executive):
+    def __init__(self, port, worker_number):
         self._port = port
-        self._image_path = image_path
-        self._executive = executive
-        self._image_written = False
+
+    def cmd_line(self):
+        return ['None']
 
     def poll(self):
         return True
index f5f925267031cecb394055f82d590c054a90833d..09be833d752f02fdb7944663b90e55ea730ce1a1 100644 (file)
@@ -46,8 +46,6 @@ import operator
 import tempfile
 import shutil
 
-from webkitpy.common.system.executive import Executive
-
 import webkitpy.common.system.ospath as ospath
 import webkitpy.layout_tests.layout_package.test_output as test_output
 import webkitpy.layout_tests.port.base as base
@@ -185,9 +183,8 @@ class WebKitPort(base.Port):
         # This port doesn't require any specific configuration.
         pass
 
-    def create_driver(self, image_path, options):
-        return WebKitDriver(self, image_path, options,
-                            executive=self._executive)
+    def create_driver(self, worker_number):
+        return WebKitDriver(self, worker_number)
 
     def test_base_platform_names(self):
         # At the moment we don't use test platform names, but we have
@@ -389,40 +386,36 @@ class WebKitPort(base.Port):
 class WebKitDriver(base.Driver):
     """WebKit implementation of the DumpRenderTree interface."""
 
-    def __init__(self, port, image_path, options, executive=Executive()):
+    def __init__(self, port, worker_number):
+        self._worker_number = worker_number
         self._port = port
-        self._image_path = image_path
-        self._executive = executive
         self._driver_tempdir = tempfile.mkdtemp(prefix='DumpRenderTree-')
 
     def __del__(self):
         shutil.rmtree(self._driver_tempdir)
 
-    def _driver_args(self):
-        driver_args = []
+    def cmd_line(self):
+        cmd = self._command_wrapper(self._port.get_option('wrapper'))
+        cmd += [self._port._path_to_driver(), '-']
 
-        if self._image_path:
-            driver_args.append('--pixel-tests')
+        if self._port.get_option('pixel_tests'):
+            cmd.append('--pixel-tests')
 
         if self._port.get_option('use_drt'):
             if self._port.get_option('accelerated_compositing'):
-                driver_args.append('--enable-accelerated-compositing')
+                cmd.append('--enable-accelerated-compositing')
 
             if self._port.get_option('accelerated_2d_canvas'):
-                driver_args.append('--enable-accelerated-2d-canvas')
+                cmd.append('--enable-accelerated-2d-canvas')
 
-        return driver_args
+        return cmd
 
     def start(self):
-        command = self._command_wrapper(self._port.get_option('wrapper'))
-        command += [self._port._path_to_driver(), '-']
-        command += self._driver_args()
-
         environment = self._port.setup_environ_for_server()
         environment['DYLD_FRAMEWORK_PATH'] = self._port._build_path()
         environment['DUMPRENDERTREE_TEMP'] = self._driver_tempdir
         self._server_process = server_process.ServerProcess(self._port,
-            "DumpRenderTree", command, environment)
+            "DumpRenderTree", self.cmd_line(), environment)
 
     def poll(self):
         return self._server_process.poll()
index d78e45299fd4ed2f13c15c4ee09c3ae234d739fe..643e20493c8a3bf40ab08ef44b9de70911b43e79 100755 (executable)
@@ -897,6 +897,8 @@ class TestRunner:
             p.print_config("Running %s %ss in parallel" %
                            (self._options.child_processes,
                             self._port.driver_name()))
+        p.print_config('Command line: ' +
+                       ' '.join(self._port.driver_cmd_line()))
         p.print_config("Worker model: %s" % self._options.worker_model)
         p.print_config("")
 
@@ -1571,7 +1573,7 @@ def parse_args(args=None):
         #      Number of times to run the set of tests (e.g. ABCABCABC)
         optparse.make_option("--print-last-failures", action="store_true",
             default=False, help="Print the tests in the last run that "
-            "had unexpected failures (or passes)."),
+            "had unexpected failures (or passes) and then exit."),
         optparse.make_option("--retest-last-failures", action="store_true",
             default=False, help="re-test the tests in the last run that "
             "had unexpected failures (or passes)."),
index b3c886103c8ab715b37695bdb65061f9da9d6d48..20a4ac0eada795650599f9100b1a30f13fea6270 100644 (file)
@@ -139,8 +139,8 @@ def get_tests_run(extra_args=None, tests_included=False, flatten_batches=False):
     test_batches = []
 
     class RecordingTestDriver(TestDriver):
-        def __init__(self, port, image_path, options):
-            TestDriver.__init__(self, port, image_path, options, executive=None)
+        def __init__(self, port, worker_number):
+            TestDriver.__init__(self, port, worker_number)
             self._current_test_batch = None
 
         def poll(self):
@@ -159,8 +159,8 @@ def get_tests_run(extra_args=None, tests_included=False, flatten_batches=False):
             return TestDriver.run_test(self, test_input)
 
     class RecordingTestPort(TestPort):
-        def create_driver(self, image_path, options):
-            return RecordingTestDriver(self, image_path, options)
+        def create_driver(self, worker_number):
+            return RecordingTestDriver(self, worker_number)
 
     recording_port = RecordingTestPort(options=options, user=user)
     logging_run(extra_args=args, port_obj=recording_port, tests_included=True)