From 997cf8f39cfe672441e76f5a997a957537e3dbf7 Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Mon, 22 Aug 2011 18:56:59 +0000 Subject: Revert "Fix sync integration tests by fixing Python path." This reverts commit r97696. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97697 0039d316-1c4b-4281-b951-d872f2087c98 --- net/test/python_utils.cc | 2 -- net/test/test_server.cc | 14 ++++++-------- net/tools/testserver/chromiumsync_test.py | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) (limited to 'net') diff --git a/net/test/python_utils.cc b/net/test/python_utils.cc index f4fb487..0eec816 100644 --- a/net/test/python_utils.cc +++ b/net/test/python_utils.cc @@ -16,8 +16,6 @@ const char kPythonPathEnv[] = "PYTHONPATH"; void AppendToPythonPath(const FilePath& dir) { - CHECK(file_util::DirectoryExists(dir)); - scoped_ptr env(base::Environment::Create()); std::string old_path; std::string dir_path; diff --git a/net/test/test_server.cc b/net/test/test_server.cc index d76430d..8723215 100644 --- a/net/test/test_server.cc +++ b/net/test/test_server.cc @@ -304,19 +304,17 @@ bool TestServer::SetPythonPath() { third_party_dir.AppendASCII("pyftpdlib").AppendASCII("src")); // Locate the Python code generated by the protocol buffers compiler. - FilePath pyproto_dir; - if (!GetPyProtoPath(&pyproto_dir)) { + FilePath pyproto_code_dir; + if (!GetPyProtoPath(&pyproto_code_dir)) { LOG(WARNING) << "Cannot find pyproto dir for generated code. " << "Testserver features that rely on it will not work"; return true; } - AppendToPythonPath(pyproto_dir); - AppendToPythonPath(pyproto_dir.AppendASCII("chrome") - .AppendASCII("browser") - .AppendASCII("sync") - .AppendASCII("protocol")); - AppendToPythonPath(pyproto_dir.AppendASCII("device_management_pb")); + AppendToPythonPath(pyproto_code_dir); + AppendToPythonPath(pyproto_code_dir.Append(FILE_PATH_LITERAL("sync_pb"))); + AppendToPythonPath(pyproto_code_dir.Append( + FILE_PATH_LITERAL("device_management_pb"))); return true; } diff --git a/net/tools/testserver/chromiumsync_test.py b/net/tools/testserver/chromiumsync_test.py index 97e5f38..1872a9d 100755 --- a/net/tools/testserver/chromiumsync_test.py +++ b/net/tools/testserver/chromiumsync_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2.4 # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -- cgit v1.1