diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2010-11-10 15:31:59 -0800 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2010-11-17 13:35:59 -0800 |
commit | 28040489d744e0c5d475a88663056c9040ed5320 (patch) | |
tree | c463676791e4a63e452a95f0a12b2a8519730693 /WebKitTools/Scripts/webkitpy/layout_tests/layout_package | |
parent | eff9be92c41913c92fb1d3b7983c071f3e718678 (diff) | |
download | external_webkit-28040489d744e0c5d475a88663056c9040ed5320.zip external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.gz external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.bz2 |
Merge WebKit at r71558: Initial merge by git.
Change-Id: Ib345578fa29df7e4bc72b4f00e4a6fddcb754c4c
Diffstat (limited to 'WebKitTools/Scripts/webkitpy/layout_tests/layout_package')
-rw-r--r-- | WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py index 3e3ba0b..9f2de7e 100644 --- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py +++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py @@ -341,7 +341,7 @@ class TestShellThread(WatchableThread): def cancel(self): """Clean up http lock and set a flag telling this thread to quit.""" - self._stop_http_lock() + self._stop_servers_with_lock() WatchableThread.cancel(self) def next_timeout(self): @@ -389,23 +389,15 @@ class TestShellThread(WatchableThread): self._current_group, self._filename_list = \ self._filename_list_queue.get_nowait() except Queue.Empty: - self._stop_http_lock() + self._stop_servers_with_lock() self._kill_dump_render_tree() tests_run_file.close() return - if self._options.wait_for_httpd: - if self._current_group == "tests_to_http_lock": - self._http_lock_wait_begin = time.time() - self._port.acquire_http_lock() - - self._port.start_http_server() - self._port.start_websocket_server() - - self._have_http_lock = True - self._http_lock_wait_end = time.time() - elif self._have_http_lock: - self._stop_http_lock() + if self._current_group == "tests_to_http_lock": + self._start_servers_with_lock() + elif self._have_http_lock: + self._stop_servers_with_lock() self._num_tests_in_current_group = len(self._filename_list) self._current_group_start_time = time.time() @@ -440,7 +432,7 @@ class TestShellThread(WatchableThread): self._port.relative_test_filename(filename))) self._result_queue.put(result.dumps()) - if batch_size > 0 and batch_count > batch_size: + if batch_size > 0 and batch_count >= batch_size: # Bounce the shell and reset count. self._kill_dump_render_tree() batch_count = 0 @@ -545,11 +537,26 @@ class TestShellThread(WatchableThread): self._options) self._driver.start() - def _stop_http_lock(self): + def _start_servers_with_lock(self): + """Acquire http lock and start the servers.""" + self._http_lock_wait_begin = time.time() + _log.debug('Acquire http lock ...') + self._port.acquire_http_lock() + _log.debug('Starting HTTP server ...') + self._port.start_http_server() + _log.debug('Starting WebSocket server ...') + self._port.start_websocket_server() + self._http_lock_wait_end = time.time() + self._have_http_lock = True + + def _stop_servers_with_lock(self): """Stop the servers and release http lock.""" if self._have_http_lock: + _log.debug('Stopping HTTP server ...') self._port.stop_http_server() + _log.debug('Stopping WebSocket server ...') self._port.stop_websocket_server() + _log.debug('Release http lock ...') self._port.release_http_lock() self._have_http_lock = False |