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

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

Issue 21537002: Remove hard dependency on bundled python_26 in tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@glyphcache_20130604
Patch Set: Created 7 years, 4 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
OLDNEW
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" 10 #include "base/file_util.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 #endif 101 #endif
102 *dir = generated_code_dir.Append(kPyProto); 102 *dir = generated_code_dir.Append(kPyProto);
103 VLOG(2) << "Found " << kPyProto.value() << " in " << dir->value(); 103 VLOG(2) << "Found " << kPyProto.value() << " in " << dir->value();
104 return true; 104 return true;
105 } 105 }
106 106
107 bool GetPythonCommand(CommandLine* python_cmd) { 107 bool GetPythonCommand(CommandLine* python_cmd) {
108 DCHECK(python_cmd); 108 DCHECK(python_cmd);
109 base::FilePath dir; 109 base::FilePath dir;
110 #if defined(OS_WIN) 110 #if defined(OS_WIN)
111 if (!PathService::Get(base::DIR_SOURCE_ROOT, &dir)) 111 dir = base::FilePath(FILE_PATH_LITERAL("python.exe"));
Paweł Hajdan Jr. 2013/08/01 17:56:28 nit: Sort of a pre-existing thing, but "dir" is te
Daniel Bratell 2013/08/02 07:27:53 It means that we'll start using python.bat from de
112 return false;
113 dir = dir.Append(FILE_PATH_LITERAL("third_party"))
114 .Append(FILE_PATH_LITERAL("python_26"))
115 .Append(FILE_PATH_LITERAL("python.exe"));
116 #elif defined(OS_POSIX) 112 #elif defined(OS_POSIX)
117 dir = base::FilePath("python"); 113 dir = base::FilePath("python");
118 #endif 114 #endif
119 115
120 python_cmd->SetProgram(dir); 116 python_cmd->SetProgram(dir);
121 117
122 // Launch python in unbuffered mode, so that python output doesn't mix with 118 // Launch python in unbuffered mode, so that python output doesn't mix with
123 // gtest output in buildbot log files. See http://crbug.com/147368. 119 // gtest output in buildbot log files. See http://crbug.com/147368.
124 python_cmd->AppendArg("-u"); 120 python_cmd->AppendArg("-u");
125 121
126 return true; 122 return true;
127 } 123 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698