Diff
Modified: trunk/Tools/ChangeLog (99906 => 99907)
--- trunk/Tools/ChangeLog 2011-11-10 23:31:31 UTC (rev 99906)
+++ trunk/Tools/ChangeLog 2011-11-10 23:31:45 UTC (rev 99907)
@@ -1,3 +1,18 @@
+2011-11-10 Tony Chang <[email protected]>
+
+ Lazily start DRT instances in NRWT
+ https://bugs.webkit.org/show_bug.cgi?id=72038
+
+ Reviewed by Eric Seidel.
+
+ Just a refactoring, no new tests.
+
+ * Scripts/webkitpy/layout_tests/controllers/worker.py:
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ * Scripts/webkitpy/layout_tests/port/dryrun.py:
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ * Scripts/webkitpy/layout_tests/port/webkit.py:
+
2011-11-10 Ryosuke Niwa <[email protected]>
ChangeLog mistakenly recognizes any string between '*' and ':' as touched files
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/worker.py (99906 => 99907)
--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/worker.py 2011-11-10 23:31:31 UTC (rev 99906)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/worker.py 2011-11-10 23:31:45 UTC (rev 99907)
@@ -205,7 +205,6 @@
worker = self
driver = self._port.create_driver(self._worker_number)
- driver.start()
class SingleTestThread(threading.Thread):
def __init__(self):
@@ -246,7 +245,6 @@
"""
if not self._driver or self._driver.poll() is not None:
self._driver = self._port.create_driver(self._worker_number)
- self._driver.start()
return self.run_single_test(self._driver, test_input)
def run_single_test(self, driver, test_input):
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py (99906 => 99907)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py 2011-11-10 23:31:31 UTC (rev 99906)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py 2011-11-10 23:31:45 UTC (rev 99907)
@@ -448,7 +448,7 @@
cmd.extend(self._wrapper_options())
return cmd
- def start(self):
+ def _start(self):
assert not self._proc
# FIXME: This should use ServerProcess like WebKitDriver does.
# FIXME: We should be reading stderr and stdout separately like how WebKitDriver does.
@@ -510,6 +510,9 @@
self._port._filesystem.remove(self._image_path)
def run_test(self, driver_input):
+ if not self._proc:
+ self._start()
+
output = []
error = []
crash = False
@@ -523,7 +526,7 @@
uri = self._port.test_to_uri(driver_input.test_name)
cmd = self._test_shell_command(uri, driver_input.timeout, driver_input.image_hash)
- (line, crash) = self._write_command_and_read_line(input=cmd)
+ line, crash = self._write_command_and_read_line(input=cmd)
while not crash and line.rstrip() != "#EOF":
# Make sure we haven't crashed.
@@ -565,7 +568,7 @@
else:
error.append(line)
- (line, crash) = self._write_command_and_read_line(input=None)
+ line, crash = self._write_command_and_read_line(input=None)
run_time = time.time() - start_time
output_image = self._output_image_with_retry()
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/dryrun.py (99906 => 99907)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/dryrun.py 2011-11-10 23:31:31 UTC (rev 99906)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/dryrun.py 2011-11-10 23:31:45 UTC (rev 99907)
@@ -134,8 +134,5 @@
audio = self._port.expected_audio(driver_input.test_name)
return DriverOutput(text, image, checksum, audio, crash=False, test_time=time.time() - start_time, timeout=False, error='')
- def start(self):
- pass
-
def stop(self):
pass
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/test.py (99906 => 99907)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/test.py 2011-11-10 23:31:31 UTC (rev 99906)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/test.py 2011-11-10 23:31:45 UTC (rev 99907)
@@ -509,8 +509,5 @@
test.actual_checksum, audio, crash=test.crash,
test_time=time.time() - start_time, timeout=test.timeout, error=test.error)
- def start(self):
- pass
-
def stop(self):
pass
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py (99906 => 99907)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py 2011-11-10 23:31:31 UTC (rev 99906)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py 2011-11-10 23:31:45 UTC (rev 99907)
@@ -455,6 +455,7 @@
# instead scope these locally in run_test.
self.error_from_test = str()
self.err_seen_eof = False
+ self._server_process = None
# FIXME: This may be unsafe, as python does not guarentee any ordering of __del__ calls
@@ -479,7 +480,7 @@
cmd.append('-')
return cmd
- def start(self):
+ def _start(self):
server_name = self._port.driver_name()
environment = self._port.setup_environ_for_server(server_name)
environment['DYLD_FRAMEWORK_PATH'] = self._port._build_path()
@@ -540,6 +541,8 @@
return (None, block.content_hash)
def run_test(self, driver_input):
+ if not self._server_process:
+ self._start()
self.error_from_test = str()
self.err_seen_eof = False