Rev 5187: (vila) Workaround ``Crypto.Random`` check leading to spurious test in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Apr 27 08:59:49 BST 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5187 [merge]
revision-id: pqm at pqm.ubuntu.com-20100427075947-zt0dt5fq780y65fr
parent: pqm at pqm.ubuntu.com-20100427010445-rargwg6u8xyjv80b
parent: v.ladeuil+lp at free.fr-20100427064039-yvrfncvtjhg3h1mp
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2010-04-27 08:59:47 +0100
message:
(vila) Workaround ``Crypto.Random`` check leading to spurious test
failures
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
=== modified file 'NEWS'
--- a/NEWS 2010-04-26 23:36:26 +0000
+++ b/NEWS 2010-04-27 06:40:39 +0000
@@ -75,9 +75,12 @@
Testing
*******
- * ``bzr selftest --parallel=subprocess`` now works correctly on win32.
+* ``bzr selftest --parallel=subprocess`` now works correctly on win32.
(Gordon Tyler, #551332)
+* Workaround ``Crypto.Random`` check leading to spurious test
+ failures on Lucid, FreeBSD and gentoo.
+ (Vincent Ladeuil, #528436)
bzr 2.2b2
#########
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py 2010-04-23 08:51:52 +0000
+++ b/bzrlib/tests/__init__.py 2010-04-23 16:22:41 +0000
@@ -3201,6 +3201,19 @@
return result
+def workaround_zealous_crypto_random():
+ """Crypto.Random want to help us being secure, but we don't care here.
+
+ This workaround some test failure related to the sftp server. Once paramiko
+ stop using the controversial API in Crypto.Random, we may get rid of it.
+ """
+ try:
+ from Crypto.Random import atfork
+ atfork()
+ except ImportError:
+ pass
+
+
def fork_for_tests(suite):
"""Take suite and start up one runner per CPU by forking()
@@ -3230,6 +3243,7 @@
c2pread, c2pwrite = os.pipe()
pid = os.fork()
if pid == 0:
+ workaround_zealous_crypto_random()
try:
os.close(c2pread)
# Leave stderr and stdout open so we can see test noise
More information about the bazaar-commits
mailing list