diff options
| author | Damian Johnson <atagar@torproject.org> | 2017-05-24 13:05:37 -0700 |
|---|---|---|
| committer | Damian Johnson <atagar@torproject.org> | 2017-05-24 13:05:37 -0700 |
| commit | 0d6212ed5f650f2364ac27dda88363b0de0265af (patch) | |
| tree | dfa14145a1c6402984dd6db8f1c4d66127145711 | |
| parent | b21d5909062dad03f2fd48675e28897aa11e5dc3 (diff) | |
Testing with relative tor paths failed with RELATIVE target
When running with the RELATIVE target we shift our cwd causing relative paths
to fail. Resolving them to absolute paths before that. Good thing to do anyway
so our logs say what we're actually running.
Another issue caught by catalyst...
https://trac.torproject.org/projects/tor/ticket/22366
| -rw-r--r-- | test/runner.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/runner.py b/test/runner.py index 5686b4cd..bbaa4aad 100644 --- a/test/runner.py +++ b/test/runner.py @@ -197,6 +197,7 @@ class Runner(object): self._test_dir = tempfile.mktemp('-stem-integ') original_cwd, data_dir_path = os.getcwd(), self._test_dir + self._tor_cmd = os.path.abspath(tor_cmd) if test.Target.RELATIVE in self.attribute_targets: tor_cwd = os.path.dirname(self._test_dir) @@ -207,7 +208,6 @@ class Runner(object): os.chdir(tor_cwd) data_dir_path = './%s' % os.path.basename(self._test_dir) - self._tor_cmd = tor_cmd self._custom_opts = extra_torrc_opts self._torrc_contents = BASE_TORRC % (data_dir_path, data_dir_path) @@ -217,7 +217,7 @@ class Runner(object): try: self._tor_cwd = os.getcwd() self._run_setup() - self._start_tor(tor_cmd) + self._start_tor(self._tor_cmd) # strip the testing directory from recv_message responses if we're # simulating a chroot setup |
