Chromium Code Reviews| Index: net/test/python_utils.cc |
| diff --git a/net/test/python_utils.cc b/net/test/python_utils.cc |
| index bf66bea93bd2e79ce2bb5ea2a4244e5bd83b3909..712d9c90cd2a385d353da2a022f6c2a2aa61ceb2 100644 |
| --- a/net/test/python_utils.cc |
| +++ b/net/test/python_utils.cc |
| @@ -109,8 +109,15 @@ bool GetPyProtoPath(base::FilePath* dir) { |
| bool GetPythonCommand(CommandLine* python_cmd) { |
| DCHECK(python_cmd); |
| - python_cmd->SetProgram(base::FilePath(FILE_PATH_LITERAL("python"))); |
| +#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"); |
|
Paweł Hajdan Jr.
2013/12/02 19:37:56
nit: Remove empty line.
M-A Ruel
2013/12/02 20:13:16
Done.
|
| +#elif defined(OS_POSIX) |
| + python_cmd->SetProgram(base::FilePath(FILE_PATH_LITERAL("python"))); |
| +#endif |
| // 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"); |