diff options
author | yuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-14 05:57:48 +0000 |
---|---|---|
committer | yuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-14 05:57:48 +0000 |
commit | 1f50182afc7635811a55a47bcd8218275e7acfae (patch) | |
tree | b159ca6436dcd2f31211776e59600046aaefc2a7 /webkit/tools/layout_tests/run_webkit_tests.py | |
parent | 1e9cd27216e273d8d71725df1495fa05e662f714 (diff) | |
download | chromium_src-1f50182afc7635811a55a47bcd8218275e7acfae.zip chromium_src-1f50182afc7635811a55a47bcd8218275e7acfae.tar.gz chromium_src-1f50182afc7635811a55a47bcd8218275e7acfae.tar.bz2 |
Change run_webkit_tests.py to start up/shut down pywebsocket server if needed.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/267070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28949 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/layout_tests/run_webkit_tests.py')
-rwxr-xr-x | webkit/tools/layout_tests/run_webkit_tests.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/webkit/tools/layout_tests/run_webkit_tests.py b/webkit/tools/layout_tests/run_webkit_tests.py index 8621c9a..2f617e1 100755 --- a/webkit/tools/layout_tests/run_webkit_tests.py +++ b/webkit/tools/layout_tests/run_webkit_tests.py @@ -43,6 +43,7 @@ from layout_package import path_utils from layout_package import test_failures from layout_package import test_shell_thread from layout_package import test_files +from layout_package import websocket_server from test_types import fuzzy_image_diff from test_types import image_diff from test_types import test_type_base @@ -112,6 +113,7 @@ class TestRunner: files.""" HTTP_SUBDIR = os.sep.join(['', 'http', '']) + WEBSOCKET_SUBDIR = os.sep.join(['', 'websocket', '']) # The per-test timeout in milliseconds, if no --time-out-ms option was given # to run_webkit_tests. This should correspond to the default timeout in @@ -127,6 +129,8 @@ class TestRunner: self._options = options self._http_server = http_server.Lighttpd(options.results_directory) + self._websocket_server = websocket_server.PyWebSocket( + options.results_directory) # a list of TestType objects self._test_types = [] @@ -143,6 +147,8 @@ class TestRunner: logging.info("stopping http server") # Stop the http server. self._http_server.Stop() + # Stop the Web Socket server. + self._websocket_server.Stop() def GatherFilePaths(self, paths): """Find all the files to test. @@ -420,6 +426,14 @@ class TestRunner: return (test_args, shell_args) + def _ContainWebSocketTest(self, test_files): + if not test_files: + return False + for test_file in test_files: + if test_file.find(self.WEBSOCKET_SUBDIR) >= 0: + return True + return False + def _InstantiateTestShellThreads(self, test_shell_binary): """Instantitates and starts the TestShellThread(s). @@ -443,6 +457,10 @@ class TestRunner: or self._options.randomize_order): self._http_server.Start() + # Start Web Socket server. + if (self._ContainWebSocketTest(test_files)): + self._websocket_server.Start() + # Instantiate TestShellThreads and start them. threads = [] for i in xrange(int(self._options.num_test_shells)): |