[MERGE][minor] Make selftest output sane under windows

Martin Pool mbp at sourcefrog.net
Fri Jun 29 06:38:49 BST 2007


On 6/29/07, Martin <gzlist at googlemail.com> wrote:
> Problem: every test run by bzr selftest prints an unlink error, which
> completely breaks the console summary backtracking and makes it
> impossible to keep tabs on what are the actual errors.

Thanks, merged.  You might need to cd out of the TEST_ROOT later on
back to the directory where we originally started, so that it too can
be removed.

> Patch attached is not complete selftest unlink cleanup in that there
> are still bits left behind when the tests complete (2 dirs, and 601
> files), but does make the console output behave as it should without
> making anything worse.
> Does not deal with general bzrlib.osutils.rmtree failure, which could
> be done by either comparing os.getcwd() to os.path.normpath(path) all
> the time [bad] or when an error is thrown [better] as doesn't seem to
> be an actual problem anywhere but in running the tests, and would be a
> more pervasive (not one line) diff.

You could certainly put that into _rmtree_temp_dir - though having bzr
change to a different directory unexpectedly might cause trouble.  It
might be better to emit a warning if we ever try to delete a directory
containing the pwd, so that such problems are obvious on unix.

I think you mentioned in your other mail that skipped tests leave log
files behind - that is probably also a very short fix and it would be
great if you could try that.

Thanks for fixing these, it's very much appreciated!

-- 
Martin



More information about the bazaar mailing list