diff options
-rw-r--r-- | base/base_paths_posix.cc | 14 | ||||
-rwxr-xr-x | testing/test_env.py | 3 |
2 files changed, 0 insertions, 17 deletions
diff --git a/base/base_paths_posix.cc b/base/base_paths_posix.cc index a1c45a0..d8d5ae6 100644 --- a/base/base_paths_posix.cc +++ b/base/base_paths_posix.cc @@ -74,20 +74,6 @@ bool PathProviderPosix(int key, FilePath* result) { #endif } case base::DIR_SOURCE_ROOT: { - // Allow passing this in the environment, for more flexibility in build - // tree configurations (sub-project builds, gyp --output_dir, etc.) - scoped_ptr<base::Environment> env(base::Environment::Create()); - std::string cr_source_root; - if (env->GetVar("CR_SOURCE_ROOT", &cr_source_root)) { - path = FilePath(cr_source_root); - if (file_util::PathExists(path)) { - *result = path; - return true; - } else { - DLOG(WARNING) << "CR_SOURCE_ROOT is set, but it appears to not " - << "point to a directory."; - } - } // On POSIX, unit tests execute two levels deep from the source root. // For example: out/{Debug|Release}/net_unittest if (PathService::Get(base::DIR_EXE, &path)) { diff --git a/testing/test_env.py b/testing/test_env.py index bbbcac5..410f812 100755 --- a/testing/test_env.py +++ b/testing/test_env.py @@ -25,14 +25,11 @@ def fix_python_path(cmd): def run_executable(cmd, env): """Runs an executable with: - - environment variable CR_SOURCE_ROOT set to the root directory. - environment variable LANGUAGE to en_US.UTF-8. - Reuses sys.executable automatically. """ # Many tests assume a English interface... env['LANGUAGE'] = 'en_US.UTF-8' - # Used by base/base_paths_linux.cc - env['CR_SOURCE_ROOT'] = os.path.abspath(ROOT_DIR).encode('utf-8') # Ensure paths are correctly separated on windows. cmd[0] = cmd[0].replace('/', os.path.sep) cmd = fix_python_path(cmd) |