[MERGE] Add --debugflag/-E option to selftest.

Andrew Bennetts andrew at canonical.com
Fri May 2 07:12:29 BST 2008


This patch adds a --debugflag=foo/-E=foo option to selftest.  It's very similar
in nature to the global debug flags.  The intent is that this would be used for
setting debug flags that are specific only to the test suite.  For instance:

 * the existing -Dselftest_debug becomes -E=allow_debug.  This removes a little
   bit of test-only crud from non-test code.
 * Robert has a patch[1] that would cause -Dlock to trigger errors, intended for
   use in conjunction with running the test suite.  Martin voted “resubmit”
   because he'd rather debug flags didn't have side-effects (or at least, if
   they do potentially useful logging they shouldn't force you to also accept
   their side-effects).  I think both would be happy with a -E=strict-locks or
   similar rather than changing the existing -Dlock.

I'd like to use Robert's lock checking, hence this patch :)

Code outside of the bzrlib.tests package shouldn't ever look at the
bzrlib.tests.selftest_debug_flags variable.  So this helps keep test code
separate from non-test code, unlike just reusing the existing global debug
flags.

-Andrew.

[1]  http://bundlebuggy.aaronbentley.com/request/%3C1207281795.5960.161.camel@lifeless-64%3E

-------------- next part --------------
A non-text attachment was scrubbed...
Name: selftest-debug-flags-3391.patch
Type: text/x-diff
Size: 9550 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080502/404e4ab6/attachment.bin 


More information about the bazaar mailing list