Rev 5937: (vila) Preserve $HOME/.bzr.log from tests (Vincent Ladeuil) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Sun May 29 10:05:22 UTC 2011
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5937 [merge]
revision-id: pqm at pqm.ubuntu.com-20110529100514-fc0vkagv9j31jff1
parent: pqm at pqm.ubuntu.com-20110528162122-01dpztbjm3u1u475
parent: v.ladeuil+lp at free.fr-20110528105118-h2w9jq34e2ql8eqv
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Sun 2011-05-29 10:05:14 +0000
message:
(vila) Preserve $HOME/.bzr.log from tests (Vincent Ladeuil)
modified:
bzrlib/tests/test_import_tariff.py test_import_tariff.p-20100207155145-ff9infp7goncs7zh-1
doc/en/release-notes/bzr-2.4.txt bzr2.4.txt-20110114053217-k7ym9jfz243fddjm-1
=== modified file 'bzrlib/tests/test_import_tariff.py'
--- a/bzrlib/tests/test_import_tariff.py 2011-05-27 14:50:58 +0000
+++ b/bzrlib/tests/test_import_tariff.py 2011-05-28 10:51:18 +0000
@@ -20,6 +20,10 @@
import os
from testtools import content
+from bzrlib import (
+ osutils,
+ trace,
+ )
from bzrlib.bzrdir import BzrDir
from bzrlib.smart import medium
from bzrlib.transport import remote
@@ -61,6 +65,15 @@
'BZR_PLUGINS_AT', 'HOME'):
self.preserved_env_vars[name] = os.environ.get(name)
super(TestImportTariffs, self).setUp()
+ self.log_path = osutils.pathjoin(self.test_home_dir, '.bzr.log')
+ self.overrideEnv('BZR_LOG', self.log_path)
+
+ def test_log_path_overriden(self):
+ # ensure we get the log file in the right place
+ actual_log_path = trace._get_bzr_log_filename()
+ self.assertStartsWith(actual_log_path, self.test_home_dir)
+ self.assertEquals(self.log_path, actual_log_path)
+
def start_bzr_subprocess_with_import_check(self, args, stderr_file=None):
"""Run a bzr process and capture the imports.
=== modified file 'doc/en/release-notes/bzr-2.4.txt'
--- a/doc/en/release-notes/bzr-2.4.txt 2011-05-28 15:41:39 +0000
+++ b/doc/en/release-notes/bzr-2.4.txt 2011-05-29 10:05:14 +0000
@@ -78,6 +78,9 @@
suite. This can include new facilities for writing tests, fixes to
spurious test failures and changes to the way things should be tested.
+* Don't use ``$HOME/.bzr.log`` for the TestImportTariffs tests.
+ (Vincent Ladeuil, #789505)
+
* Fix deadlock in `TestImportTariffs.test_simple_serve` when stderr gets
more output than fits in the default buffer. This was happening on the
Windows buildslave, and could easily happen in other circumstances where
More information about the bazaar-commits
mailing list