commit 97b7097c414577d3dcea1ee8eb104c6203f36a01 Author: Damian Johnson atagar@torproject.org Date: Tue May 12 22:38:24 2015 -0700
Use full tor path for pidof integ test
When running our tests with the '--tor' argument the first time we run the pidof test it passes, but further runs fail. I'm not sure why that first one passes, but in checking the later ones it's picking up our 'run_tests.py --tor /path/to/tor' since it includes tor in it.
The pidof man page suggests providing an absolute path so avoiding truncation of the command for this test.
====================================================================== FAIL: test_pid_by_name_pidof ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/atagar/Desktop/stem/test/integ/util/system.py", line 145, in test_pid_by_name_pidof self.assertEqual(tor_pid, stem.util.system.pid_by_name(tor_cmd)) AssertionError: 10020 != None
---------------------------------------------------------------------- Ran 26 tests in 1.435s --- test/integ/util/system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/integ/util/system.py b/test/integ/util/system.py index 33fd342..1d36b5f 100644 --- a/test/integ/util/system.py +++ b/test/integ/util/system.py @@ -136,7 +136,7 @@ class TestSystem(unittest.TestCase): call_mock.side_effect = call_replacement
tor_pid = test.runner.get_runner().get_pid() - tor_cmd = test.runner.get_runner().get_tor_command(True) + tor_cmd = test.runner.get_runner().get_tor_command() self.assertEqual(tor_pid, stem.util.system.pid_by_name(tor_cmd))
def test_pid_by_name_ps_linux(self):
tor-commits@lists.torproject.org