John Arbash Meinel john at arbash-meinel.com
Fri Sep 29 20:50:33 BST 2006

So we finally had someone using BZR_HOME, and we found out that it
messes up the test suite.

Specifically, BZR_HOME takes precedence over HOME and APPDATA, so if you
run the test suite and have BZR_HOME set, it causes all tests to share
their configuration. And some tests set invalid configuration
intentionally, to see how bzr complains.

One thing it found is that LockDir.lock_write() *requires* a valid email
address to be set. Which we probably don't want. But that is a different
bug. (It calls config.user_email() which doesn't handle the case when
the email isn't configured correctly).

Anyway, this fixes the test suite to properly sanitize BZR_HOME from the
environment before running any tests:

=== modified file 'bzrlib/tests/__init__.py'
--- bzrlib/tests/__init__.py    2006-09-25 19:29:26 +0000
+++ bzrlib/tests/__init__.py    2006-09-29 19:45:29 +0000
@@ -703,6 +703,7 @@

     def _cleanEnvironment(self):
         new_env = {
+            'BZR_HOME': None, # Don't inherit BZR_HOME to all the tests.
             'HOME': os.getcwd(),
             'APPDATA': os.getcwd(),
             'BZR_EMAIL': None,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060929/85e090a1/attachment.pgp 

More information about the bazaar mailing list