diff options
Diffstat (limited to 'net/test')
-rw-r--r-- | net/test/python_utils.cc | 8 | ||||
-rw-r--r-- | net/test/spawned_test_server/local_test_server.cc | 5 | ||||
-rw-r--r-- | net/test/spawned_test_server/local_test_server.h | 3 | ||||
-rw-r--r-- | net/test/spawned_test_server/local_test_server_win.cc | 13 |
4 files changed, 1 insertions, 28 deletions
diff --git a/net/test/python_utils.cc b/net/test/python_utils.cc index 2555c55..d6bf873 100644 --- a/net/test/python_utils.cc +++ b/net/test/python_utils.cc @@ -109,14 +109,8 @@ bool GetPyProtoPath(base::FilePath* dir) { bool GetPythonCommand(base::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 6516136..c85e05a 100644 --- a/net/test/spawned_test_server/local_test_server.cc +++ b/net/test/spawned_test_server/local_test_server.cc @@ -124,11 +124,6 @@ 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) { diff --git a/net/test/spawned_test_server/local_test_server.h b/net/test/spawned_test_server/local_test_server.h index 334c434..5c4ca22 100644 --- a/net/test/spawned_test_server/local_test_server.h +++ b/net/test/spawned_test_server/local_test_server.h @@ -96,9 +96,6 @@ class LocalTestServer : public BaseTestServer { base::ProcessHandle process_handle_; #if defined(OS_WIN) - // JobObject used to clean up orphaned child processes. - base::win::ScopedHandle job_handle_; - // The pipe file handle we read from. base::win::ScopedHandle child_read_fd_; 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 726a581..1454e85 100644 --- a/net/test/spawned_test_server/local_test_server_win.cc +++ b/net/test/spawned_test_server/local_test_server_win.cc @@ -178,21 +178,8 @@ bool LocalTestServer::LaunchPython(const base::FilePath& testserver_path) { python_command.AppendArg("--startup-pipe=" + base::IntToString(reinterpret_cast<uintptr_t>(child_write))); - job_handle_.Set(CreateJobObject(NULL, NULL)); - if (!job_handle_.IsValid()) { - LOG(ERROR) << "Could not create JobObject."; - return false; - } - - if (!base::SetJobObjectLimitFlags(job_handle_.Get(), - JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE)) { - LOG(ERROR) << "Could not SetJobObjectLimitFlags."; - return false; - } - base::LaunchOptions launch_options; launch_options.inherit_handles = true; - launch_options.job_handle = job_handle_.Get(); if (!base::LaunchProcess(python_command, launch_options, &process_handle_)) { LOG(ERROR) << "Failed to launch " << python_command.GetCommandLineString(); return false; |