[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Skipping test_get_pid_by_port when connection resolvers are unavailable



commit 5879995bf9118792a9c27376a93361e779ec4fc2
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Fri Apr 5 09:19:48 2013 -0700

    Skipping test_get_pid_by_port when connection resolvers are unavailable
    
    Our jenkins setup revealed that when netstat, sockstat, and lsof are all
    unavailable test_get_pid_by_port fails. Skipping instead since those connection
    resolvers are dependencies for the test.
---
 test/integ/util/system.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/test/integ/util/system.py b/test/integ/util/system.py
index 7ad046d..2c2bc5d 100644
--- a/test/integ/util/system.py
+++ b/test/integ/util/system.py
@@ -222,6 +222,11 @@ class TestSystem(unittest.TestCase):
     elif not runner.is_ptraceable():
       test.runner.skip(self, "(DisableDebuggerAttachment is set)")
       return
+    elif not (stem.util.system.is_available("netstat") or
+              stem.util.system.is_available("sockstat") or
+              stem.util.system.is_available("lsof")):
+      test.runner.skip(self, "(connection resolvers unavailable)")
+      return
 
     tor_pid, tor_port = runner.get_pid(), test.runner.CONTROL_PORT
     self.assertEquals(tor_pid, stem.util.system.get_pid_by_port(tor_port))

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits