[MERGE] More than double the speed of "bzr selftest"
andrew at canonical.com
Fri Jun 8 02:02:10 BST 2007
John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Martin Pool wrote:
> > Here's my overall bundle for this. It takes it further than Andrew
> > did, removing --keep-output and always storing the test directories in
> > TMPDIR, which makes things faster overall.
> I just ran into a problem with this. You are using "atexit()" to register a
> cleanup function.
> However, 'bzr' the front-end uses 'os._exit()' rather that sys.exit because we
> don't feel like wasting time cleaning up after ourselves.
> But that means that atexit() no longer runs, so we won't be cleaning up our
> temporary directories.
> To fix this, I think we can just extend our TestSuiteRunner so that we can
> setup things for it to run after everything is done.
Even simpler: call sys.exitfunc() just before calling os._exit().
More information about the bazaar