Chromium Code Reviews| 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 1726230c131cb8911bb50c2efb571af6ae0d8cb6..e1fe7b18b61fec26bb0ac32d882c0b9930f5773e 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)) |
|
bulach
2014/04/29 09:06:21
probably unrelated, but does |value| needs quoting
davidben
2014/04/29 16:09:12
This gets put into an argv not a shell command and
|
| 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() |