[MERGE] provide lock debugging in tests

Robert Collins robertc at robertcollins.net
Fri Apr 4 05:03:15 BST 2008

This causes the test suite to print out things like:
Broken test test_20_lock_peek (bzrlib.tests.test_lockdir.TestLockDir): Different number of acquired and released locks. ([<bzrlib.lock.LockResult object at 0x33f9d10>], [])
When a test does not clean up its physical locks properly. This isn't
100% congruent with our current test stipple, but its a lot clearer as
the culprit tests will almost certainly show up.

Passing -Dlock will turn these into errors rather than simple test spew.
Once we have the test suite passing with -Dlock I propose removing the
spew entirely and making the tests always fail. 

Additionally, in future it would be nice for -Dlock to cause the lock
actions to get a backtrace of the caller so the test error can provide
detailed information.

GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-suite.lock_checking-3334.patch
Type: text/x-patch
Size: 12723 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080404/e4a14024/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080404/e4a14024/attachment-0001.pgp 

More information about the bazaar mailing list