~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-07-04 09:38:10 UTC
  • mfrom: (5331.1.1 lsprof_lockout)
  • Revision ID: pqm@pqm.ubuntu.com-20100704093810-tqw6ncyt13z65q0m
(lifeless) Make lsprof usage serialise rather than generated corrupted
 results when used concurrently in a threaded application. Can now cause
 deadlocks when used reentrantly. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3377
3377
 
3378
3378
    def startTest(self, test):
3379
3379
        self.profiler = bzrlib.lsprof.BzrProfiler()
 
3380
        # Prevent deadlocks in tests that use lsprof: those tests will
 
3381
        # unavoidably fail.
 
3382
        bzrlib.lsprof.BzrProfiler.profiler_block = 0
3380
3383
        self.profiler.start()
3381
3384
        ForwardingResult.startTest(self, test)
3382
3385