diff options
-rw-r--r-- | chrome/browser_tests.isolate | 1 | ||||
-rw-r--r-- | chrome/interactive_ui_tests.isolate | 1 | ||||
-rw-r--r-- | chrome/unit_tests.isolate | 1 | ||||
-rw-r--r-- | content/content_browsertests.isolate | 1 | ||||
-rw-r--r-- | net/net_unittests.isolate | 3 | ||||
-rw-r--r-- | net/test/python_utils.cc | 8 | ||||
-rw-r--r-- | net/test/spawned_test_server/local_test_server.cc | 8 | ||||
-rw-r--r-- | net/test/spawned_test_server/local_test_server_win.cc | 9 | ||||
-rwxr-xr-x | net/tools/testserver/testserver.py | 15 |
9 files changed, 25 insertions, 22 deletions
diff --git a/chrome/browser_tests.isolate b/chrome/browser_tests.isolate index 6ef6ff6..a9a4d32 100644 --- a/chrome/browser_tests.isolate +++ b/chrome/browser_tests.isolate @@ -161,7 +161,6 @@ 'isolate_dependency_untracked': [ '../third_party/npapi/npspy/extern/plugin/', '../third_party/psyco_win32/psyco/', - '../third_party/python_26/', ], }, }], diff --git a/chrome/interactive_ui_tests.isolate b/chrome/interactive_ui_tests.isolate index 357684e..c49ab9c 100644 --- a/chrome/interactive_ui_tests.isolate +++ b/chrome/interactive_ui_tests.isolate @@ -84,7 +84,6 @@ '<(PRODUCT_DIR)/ppGoogleNaClPluginChrome.dll', ], 'isolate_dependency_untracked': [ - '../third_party/python_26/', '<(PRODUCT_DIR)/plugins/npapi_test_plugin.dll', ], }, diff --git a/chrome/unit_tests.isolate b/chrome/unit_tests.isolate index 6dd2268..6cd3510 100644 --- a/chrome/unit_tests.isolate +++ b/chrome/unit_tests.isolate @@ -108,7 +108,6 @@ 'isolate_dependency_untracked': [ '../ppapi/lib/gl/include/KHR/', '../skia/ext/data/', - '../third_party/python_26/', '../ui/base/glib/', ], }, diff --git a/content/content_browsertests.isolate b/content/content_browsertests.isolate index dcc33da..966a3c8f 100644 --- a/content/content_browsertests.isolate +++ b/content/content_browsertests.isolate @@ -97,7 +97,6 @@ # WorkerXHRHttpLayoutTest.Tests which are currently disabled. #'../third_party/cygwin/', #'../third_party/perl/perl/', - '../third_party/python_26/', ], }, }], diff --git a/net/net_unittests.isolate b/net/net_unittests.isolate index 870723a..2e04ea3 100644 --- a/net/net_unittests.isolate +++ b/net/net_unittests.isolate @@ -43,9 +43,6 @@ 'isolate_dependency_tracked': [ '<(PRODUCT_DIR)/icudt.dll', ], - 'isolate_dependency_untracked': [ - '../third_party/python_26/', - ], }, }], ], diff --git a/net/test/python_utils.cc b/net/test/python_utils.cc index bf66bea..e249a27 100644 --- a/net/test/python_utils.cc +++ b/net/test/python_utils.cc @@ -109,8 +109,14 @@ bool GetPyProtoPath(base::FilePath* dir) { bool GetPythonCommand(CommandLine* python_cmd) { DCHECK(python_cmd); +#if defined(OS_WIN) + // This permits finding the proper python in path even if it is a .bat file. + python_cmd->SetProgram(base::FilePath(FILE_PATH_LITERAL("cmd.exe"))); + python_cmd->AppendArg("/c"); + python_cmd->AppendArg("python"); +#else python_cmd->SetProgram(base::FilePath(FILE_PATH_LITERAL("python"))); - +#endif // defined(OS_WIN) // Launch python in unbuffered mode, so that python output doesn't mix with // gtest output in buildbot log files. See http://crbug.com/147368. python_cmd->AppendArg("-u"); diff --git a/net/test/spawned_test_server/local_test_server.cc b/net/test/spawned_test_server/local_test_server.cc index bf1b059..8679d7b 100644 --- a/net/test/spawned_test_server/local_test_server.cc +++ b/net/test/spawned_test_server/local_test_server.cc @@ -124,10 +124,16 @@ bool LocalTestServer::Stop() { if (!process_handle_) return true; +#if defined(OS_WIN) + // This kills all the processes in the job object. + job_handle_.Close(); +#endif + // First check if the process has already terminated. bool ret = base::WaitForSingleProcess(process_handle_, base::TimeDelta()); - if (!ret) + if (!ret) { ret = base::KillProcess(process_handle_, 1, true); + } if (ret) { base::CloseProcessHandle(process_handle_); diff --git a/net/test/spawned_test_server/local_test_server_win.cc b/net/test/spawned_test_server/local_test_server_win.cc index 08d68f8..db06742 100644 --- a/net/test/spawned_test_server/local_test_server_win.cc +++ b/net/test/spawned_test_server/local_test_server_win.cc @@ -190,15 +190,6 @@ bool LocalTestServer::LaunchPython(const base::FilePath& testserver_path) { return false; } - // Add our internal python to the path so it can be used if there is - // no system python. - base::FilePath python_dir; - if (!PathService::Get(base::DIR_SOURCE_ROOT, &python_dir)) { - LOG(ERROR) << "Could not locate source root directory."; - return false; - } - python_dir = python_dir.AppendASCII("third_party").AppendASCII("python_26"); - ScopedPath python_path(python_dir); base::LaunchOptions launch_options; launch_options.inherit_handles = true; launch_options.job_handle = job_handle_.Get(); diff --git a/net/tools/testserver/testserver.py b/net/tools/testserver/testserver.py index 83c14d6..6e85b4f 100755 --- a/net/tools/testserver/testserver.py +++ b/net/tools/testserver/testserver.py @@ -35,15 +35,22 @@ import urllib import urlparse import zlib +BASE_DIR = os.path.dirname(os.path.abspath(__file__)) +ROOT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(BASE_DIR))) + import echo_message -import pyftpdlib.ftpserver import testserver_base + +# Append at the end of sys.path, it's fine to use the system library. +sys.path.append(os.path.join(ROOT_DIR, 'third_party', 'pyftpdlib', 'src')) +sys.path.append(os.path.join(ROOT_DIR, 'third_party', 'tlslite')) +import pyftpdlib.ftpserver import tlslite import tlslite.api -BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -sys.path.insert( - 0, os.path.join(BASE_DIR, '..', '..', '..', 'third_party/pywebsocket/src')) +# Insert at the beginning of the path, we want this to be used +# unconditionally. +sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party', 'pywebsocket', 'src')) from mod_pywebsocket.standalone import WebSocketServer SERVER_HTTP = 0 |