| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/python_utils.h" | 5 #include "net/test/python_utils.h" |
| 6 | 6 |
| 7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/file_util.h" | |
| 11 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/files/file_util.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 | 16 |
| 17 const char kPythonPathEnv[] = "PYTHONPATH"; | 17 const char kPythonPathEnv[] = "PYTHONPATH"; |
| 18 | 18 |
| 19 void AppendToPythonPath(const base::FilePath& dir) { | 19 void AppendToPythonPath(const base::FilePath& dir) { |
| 20 scoped_ptr<base::Environment> env(base::Environment::Create()); | 20 scoped_ptr<base::Environment> env(base::Environment::Create()); |
| 21 std::string old_path; | 21 std::string old_path; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 DCHECK(python_cmd); | 110 DCHECK(python_cmd); |
| 111 | 111 |
| 112 python_cmd->SetProgram(base::FilePath(FILE_PATH_LITERAL("python"))); | 112 python_cmd->SetProgram(base::FilePath(FILE_PATH_LITERAL("python"))); |
| 113 | 113 |
| 114 // Launch python in unbuffered mode, so that python output doesn't mix with | 114 // Launch python in unbuffered mode, so that python output doesn't mix with |
| 115 // gtest output in buildbot log files. See http://crbug.com/147368. | 115 // gtest output in buildbot log files. See http://crbug.com/147368. |
| 116 python_cmd->AppendArg("-u"); | 116 python_cmd->AppendArg("-u"); |
| 117 | 117 |
| 118 return true; | 118 return true; |
| 119 } | 119 } |
| OLD | NEW |