OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/sync/test/local_sync_test_server.h" | 5 #include "components/sync/test/local_sync_test_server.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 net::SpawnedTestServer::kLocalhost, | 30 net::SpawnedTestServer::kLocalhost, |
31 base::FilePath()), | 31 base::FilePath()), |
32 xmpp_port_(xmpp_port) { | 32 xmpp_port_(xmpp_port) { |
33 SetPort(port); | 33 SetPort(port); |
34 } | 34 } |
35 | 35 |
36 LocalSyncTestServer::~LocalSyncTestServer() {} | 36 LocalSyncTestServer::~LocalSyncTestServer() {} |
37 | 37 |
38 bool LocalSyncTestServer::AddCommandLineArguments( | 38 bool LocalSyncTestServer::AddCommandLineArguments( |
39 base::CommandLine* command_line) const { | 39 base::CommandLine* command_line) const { |
| 40 // Suppress loading of site packages in order to avoid a version mismatch |
| 41 // between pre-installed versions of python libraries. |
| 42 // See https://bugs.chromium.org/p/chromium/issues/detail?id=649829 |
| 43 command_line->AppendSwitch("-S"); |
40 if (!LocalTestServer::AddCommandLineArguments(command_line)) | 44 if (!LocalTestServer::AddCommandLineArguments(command_line)) |
41 return false; | 45 return false; |
42 if (xmpp_port_ != 0) { | 46 if (xmpp_port_ != 0) { |
43 std::string xmpp_port_str = base::UintToString(xmpp_port_); | 47 std::string xmpp_port_str = base::UintToString(xmpp_port_); |
44 command_line->AppendArg("--xmpp-port=" + xmpp_port_str); | 48 command_line->AppendArg("--xmpp-port=" + xmpp_port_str); |
45 } | 49 } |
46 return true; | 50 return true; |
47 } | 51 } |
48 | 52 |
49 bool LocalSyncTestServer::GetTestServerPath( | 53 bool LocalSyncTestServer::GetTestServerPath( |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 << "Testserver features that rely on it will not work"; | 97 << "Testserver features that rely on it will not work"; |
94 return true; | 98 return true; |
95 } | 99 } |
96 AppendToPythonPath(pyproto_dir.AppendASCII("components") | 100 AppendToPythonPath(pyproto_dir.AppendASCII("components") |
97 .AppendASCII("sync") | 101 .AppendASCII("sync") |
98 .AppendASCII("protocol")); | 102 .AppendASCII("protocol")); |
99 return true; | 103 return true; |
100 } | 104 } |
101 | 105 |
102 } // namespace syncer | 106 } // namespace syncer |
OLD | NEW |