[tor-commits] [stem/master] Account for 'tor.real' hack in test

atagar at torproject.org atagar at torproject.org
Tue Mar 24 18:22:51 UTC 2015


commit d99ac9c2dc09e6a9e4ef6023ee90f064be09ea60
Author: Damian Johnson <atagar at torproject.org>
Date:   Tue Mar 24 10:12:50 2015 -0700

    Account for 'tor.real' hack in test
    
    Our tests expect tor to be running with the process name we ran, but this
    isn't necessarily the case. On OSX there's a hack so it runs as 'tor.real' so
    gotta check for that too. Caught thanks to corcra on...
    
      https://trac.torproject.org/projects/tor/ticket/15449
---
 docs/change_log.rst       |    1 +
 test/integ/util/system.py |    7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/docs/change_log.rst b/docs/change_log.rst
index 3764c9b..d6bbec1 100644
--- a/docs/change_log.rst
+++ b/docs/change_log.rst
@@ -69,6 +69,7 @@ conversion (:trac:`14075`).
 
   * Windows support for connection resolution (:trac:`14844`)
   * :func:`stem.util.connection.port_usage` always returned None (:trac:`14046`)
+  * Added :func:`stem.util.system.tail`
   * Proc connection resolution could fail on especially busy systems (:trac:`14048`)
 
  * **Website**
diff --git a/test/integ/util/system.py b/test/integ/util/system.py
index e06b569..33fd342 100644
--- a/test/integ/util/system.py
+++ b/test/integ/util/system.py
@@ -70,7 +70,12 @@ class TestSystem(unittest.TestCase):
       test.runner.skip(self, '(ps unavailable)')
       return
 
-    self.assertTrue(stem.util.system.is_running(test.runner.get_runner().get_tor_command(True)))
+    # Check to see if the command we started tor with is running. The process
+    # might be running under another name so need to check for 'tor.real' too
+    # (#15449).
+
+    tor_cmd = test.runner.get_runner().get_tor_command(True)
+    self.assertTrue(stem.util.system.is_running(tor_cmd) or stem.util.system.is_running('tor.real'))
     self.assertFalse(stem.util.system.is_running('blarg_and_stuff'))
 
   def test_pid_by_name(self):



More information about the tor-commits mailing list