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

Unified Diff: build/android/pylib/chrome_test_server_spawner.py

Issue 11971025: [sync] Divorce python sync test server chromiumsync.py from testserver.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/automation/testing_automation_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/chrome_test_server_spawner.py
diff --git a/build/android/pylib/chrome_test_server_spawner.py b/build/android/pylib/chrome_test_server_spawner.py
index 8206ca03b3f32410e34d04a383f6b315e1c5b60a..f70bf669380d96903bd4e90137b76c926924b501 100644
--- a/build/android/pylib/chrome_test_server_spawner.py
+++ b/build/android/pylib/chrome_test_server_spawner.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Copyright 2013 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.
@@ -24,18 +24,19 @@ from forwarder import Forwarder
import ports
-# Path that are needed to import necessary modules when running testserver.py.
-os.environ['PYTHONPATH'] = os.environ.get('PYTHONPATH', '') + ':%s:%s:%s:%s' % (
- os.path.join(constants.CHROME_DIR, 'third_party'),
- os.path.join(constants.CHROME_DIR, 'third_party', 'tlslite'),
- os.path.join(constants.CHROME_DIR, 'third_party', 'pyftpdlib', 'src'),
- os.path.join(constants.CHROME_DIR, 'net', 'tools', 'testserver'))
+# Path that are needed to import necessary modules when launching a testserver.
+os.environ['PYTHONPATH'] = os.environ.get('PYTHONPATH', '') + (':%s:%s:%s:%s:%s'
+ % (os.path.join(constants.CHROME_DIR, 'third_party'),
+ os.path.join(constants.CHROME_DIR, 'third_party', 'tlslite'),
+ os.path.join(constants.CHROME_DIR, 'third_party', 'pyftpdlib', 'src'),
+ os.path.join(constants.CHROME_DIR, 'net', 'tools', 'testserver'),
+ os.path.join(constants.CHROME_DIR, 'sync', 'tools', 'testserver')))
SERVER_TYPES = {
'http': '',
'ftp': '-f',
- 'sync': '--sync',
+ 'sync': '', # Sync uses its own script, and doesn't take a server type arg.
'tcpecho': '--tcp-echo',
'udpecho': '--udp-echo',
}
@@ -207,8 +208,13 @@ class TestServerThread(threading.Thread):
logging.info('Start running the thread!')
self.wait_event.clear()
self._GenerateCommandLineArguments()
- command = [os.path.join(constants.CHROME_DIR, 'net', 'tools',
- 'testserver', 'testserver.py')] + self.command_line
+ command = constants.CHROME_DIR
+ if self.arguments['server-type'] == 'sync':
+ command = [os.path.join(command, 'sync', 'tools', 'testserver',
+ 'sync_testserver.py')] + self.command_line
+ else:
+ command = [os.path.join(command, 'net', 'tools', 'testserver',
+ 'testserver.py')] + self.command_line
logging.info('Running: %s', command)
self.process = subprocess.Popen(command)
if self.process:
« no previous file with comments | « no previous file | chrome/browser/automation/testing_automation_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698