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

Unified Diff: net/tools/testserver/testserver.py

Issue 74253002: Stop using third_party\python_26 for many tests. (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Revert build/android/pylib/chrome_test_server_spawner.py so I can commit today Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/test/spawned_test_server/local_test_server_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/testserver/testserver.py
diff --git a/net/tools/testserver/testserver.py b/net/tools/testserver/testserver.py
index 83c14d638d33219009b0c7baa176107e80e44131..6e85b4f64083f24a3b0b1629338f5a28584fdbc9 100755
--- a/net/tools/testserver/testserver.py
+++ b/net/tools/testserver/testserver.py
@@ -35,15 +35,22 @@ import urllib
import urlparse
import zlib
+BASE_DIR = os.path.dirname(os.path.abspath(__file__))
+ROOT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(BASE_DIR)))
+
import echo_message
-import pyftpdlib.ftpserver
import testserver_base
+
+# Append at the end of sys.path, it's fine to use the system library.
+sys.path.append(os.path.join(ROOT_DIR, 'third_party', 'pyftpdlib', 'src'))
+sys.path.append(os.path.join(ROOT_DIR, 'third_party', 'tlslite'))
+import pyftpdlib.ftpserver
import tlslite
import tlslite.api
-BASE_DIR = os.path.dirname(os.path.abspath(__file__))
-sys.path.insert(
- 0, os.path.join(BASE_DIR, '..', '..', '..', 'third_party/pywebsocket/src'))
+# Insert at the beginning of the path, we want this to be used
+# unconditionally.
+sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party', 'pywebsocket', 'src'))
from mod_pywebsocket.standalone import WebSocketServer
SERVER_HTTP = 0
« no previous file with comments | « net/test/spawned_test_server/local_test_server_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698