Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: net/test/local_test_server_posix.cc

Issue 10073033: Run safebrowsing_service_test through the net testserver code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/test/local_test_server.h" 5 #include "net/test/local_test_server.h"
6 6
7 #include <poll.h> 7 #include <poll.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 namespace net { 95 namespace net {
96 96
97 bool LocalTestServer::LaunchPython(const FilePath& testserver_path) { 97 bool LocalTestServer::LaunchPython(const FilePath& testserver_path) {
98 // Log is useful in the event you want to run a nearby script (e.g. a test) in 98 // Log is useful in the event you want to run a nearby script (e.g. a test) in
99 // the same environment as the TestServer. 99 // the same environment as the TestServer.
100 VLOG(1) << "LaunchPython called with PYTHONPATH = " << 100 VLOG(1) << "LaunchPython called with PYTHONPATH = " <<
101 getenv(kPythonPathEnv); 101 getenv(kPythonPathEnv);
102 CommandLine python_command(FilePath(FILE_PATH_LITERAL("python"))); 102 CommandLine python_command(FilePath(FILE_PATH_LITERAL("python")));
103 103
104 // Make python stdout and stderr unbuffered, to prevent incomplete stderr on
Paweł Hajdan Jr. 2012/04/17 06:38:05 I'm not sure this is the right fix. How about just
mattm 2012/04/18 00:20:00 I think this still wouldn't solve the issue of inc
105 // win bots, and also fix mixed up ordering of stdout and stderr.
106 python_command.AppendSwitch("-u");
107
104 python_command.AppendArgPath(testserver_path); 108 python_command.AppendArgPath(testserver_path);
105 if (!AddCommandLineArguments(&python_command)) 109 if (!AddCommandLineArguments(&python_command))
106 return false; 110 return false;
107 111
108 int pipefd[2]; 112 int pipefd[2];
109 if (pipe(pipefd) != 0) { 113 if (pipe(pipefd) != 0) {
110 PLOG(ERROR) << "Could not create pipe."; 114 PLOG(ERROR) << "Could not create pipe.";
111 return false; 115 return false;
112 } 116 }
113 117
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 166
163 if (!ParseServerData(server_data)) { 167 if (!ParseServerData(server_data)) {
164 LOG(ERROR) << "Could not parse server_data: " << server_data; 168 LOG(ERROR) << "Could not parse server_data: " << server_data;
165 return false; 169 return false;
166 } 170 }
167 171
168 return true; 172 return true;
169 } 173 }
170 174
171 } // namespace net 175 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698