summaryrefslogtreecommitdiffstats
path: root/net/test
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-26 22:36:51 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-26 22:36:51 +0000
commit9f7f86b8c37564a9e44cd437d62b28e69a9adb6e (patch)
tree26848244e234eb4ef2b93cf2cb6278f5fdf5df14 /net/test
parent1c8fcb5fb4776144a8be48c3eb9d320137c6b51a (diff)
downloadchromium_src-9f7f86b8c37564a9e44cd437d62b28e69a9adb6e.zip
chromium_src-9f7f86b8c37564a9e44cd437d62b28e69a9adb6e.tar.gz
chromium_src-9f7f86b8c37564a9e44cd437d62b28e69a9adb6e.tar.bz2
Local test server: do not use job object on Windows
BUG= R=eroman@chromium.org Review URL: https://codereview.chromium.org/344243005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280139 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/test')
-rw-r--r--net/test/python_utils.cc8
-rw-r--r--net/test/spawned_test_server/local_test_server.cc5
-rw-r--r--net/test/spawned_test_server/local_test_server.h3
-rw-r--r--net/test/spawned_test_server/local_test_server_win.cc13
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;