[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [bridgedb/develop] Fail test_bridgedb.py tests if we couldn't start BridgeDB process on CI servers.
commit bb0a74354b57d70975fc07652634f494d32ee1cd
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date: Wed Aug 27 08:07:27 2014 +0000
Fail test_bridgedb.py tests if we couldn't start BridgeDB process on CI servers.
---
lib/bridgedb/test/test_bridgedb.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/bridgedb/test/test_bridgedb.py b/lib/bridgedb/test/test_bridgedb.py
index 7324464..3f0a17a 100644
--- a/lib/bridgedb/test/test_bridgedb.py
+++ b/lib/bridgedb/test/test_bridgedb.py
@@ -59,6 +59,9 @@ class BridgeDBCliTest(unittest.TestCase):
This test ensures that an ``assignments.log`` file is created after a
BridgeDB process was started.
"""
+ if os.environ.get("CI"):
+ if not self.pid or not processExists(self.pid):
+ raise FailTest("Could not start BridgeDB process on CI server!")
if not self.pid or not processExists(self.pid):
raise SkipTest("Can't run test: no BridgeDB process running.")
@@ -68,6 +71,9 @@ class BridgeDBCliTest(unittest.TestCase):
"""Test that BridgeDB creates a new ``assignments.log`` file after
receiving a SIGHUP.
"""
+ if os.environ.get("CI"):
+ if not self.pid or not processExists(self.pid):
+ raise FailTest("Could not start BridgeDB process on CI server!")
if not self.pid or not processExists(self.pid):
raise SkipTest("Can't run test: no BridgeDB process running.")
@@ -78,6 +84,9 @@ class BridgeDBCliTest(unittest.TestCase):
def test_bridgedb_SIGUSR1_buckets(self):
"""Test that BridgeDB dumps buckets appropriately after a SIGUSR1."""
+ if os.environ.get("CI"):
+ if not self.pid or not processExists(self.pid):
+ raise FailTest("Could not start BridgeDB process on CI server!")
if not self.pid or not processExists(self.pid):
raise SkipTest("Can't run test: no BridgeDB process running.")
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits