diff options
author | davidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-30 20:30:05 +0000 |
---|---|---|
committer | davidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-30 20:30:05 +0000 |
commit | 48a9ad9dc7be28316b777cb9f8525d6b664cfe3b (patch) | |
tree | 46a5848a9b839b6f98d8036169d9fce24b4751ea /build | |
parent | ff407b349544f28abd9b59c500b972af5e6b7263 (diff) | |
download | chromium_src-48a9ad9dc7be28316b777cb9f8525d6b664cfe3b.zip chromium_src-48a9ad9dc7be28316b777cb9f8525d6b664cfe3b.tar.gz chromium_src-48a9ad9dc7be28316b777cb9f8525d6b664cfe3b.tar.bz2 |
Change the Android test server's cwd rather than mangle arguments.
This allows even path arguments to be pass-through.
BUG=365733
Review URL: https://codereview.chromium.org/257613006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267320 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r-- | build/android/pylib/chrome_test_server_spawner.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/build/android/pylib/chrome_test_server_spawner.py b/build/android/pylib/chrome_test_server_spawner.py index 1726230..e1fe7b1 100644 --- a/build/android/pylib/chrome_test_server_spawner.py +++ b/build/android/pylib/chrome_test_server_spawner.py @@ -196,16 +196,12 @@ class TestServerThread(threading.Thread): # Pass the remaining arguments as-is. for key, values in args_copy.iteritems(): - is_path = key in ['data-dir', 'cert-and-key-file', 'ssl-client-ca'] if not isinstance(values, list): values = [values] for value in values: if value is None: self.command_line.append('--%s' % key) else: - # Arguments with file paths get mangled. - if is_path and not os.path.isabs(value): - value = os.path.join(constants.DIR_SOURCE_ROOT, value) self.command_line.append('--%s=%s' % (key, value)) def _CloseUnnecessaryFDsForTestServerProcess(self): @@ -231,8 +227,11 @@ class TestServerThread(threading.Thread): command = [os.path.join(command, 'net', 'tools', 'testserver', 'testserver.py')] + self.command_line logging.info('Running: %s', command) + # Pass DIR_SOURCE_ROOT as the child's working directory so that relative + # paths in the arguments are resolved correctly. self.process = subprocess.Popen( - command, preexec_fn=self._CloseUnnecessaryFDsForTestServerProcess) + command, preexec_fn=self._CloseUnnecessaryFDsForTestServerProcess, + cwd=constants.DIR_SOURCE_ROOT) if self.process: if self.pipe_out: self.is_ready = self._WaitToStartAndGetPortFromTestServer() |