[MERGE][minor] Make selftest output sane under windows
Martin
gzlist at googlemail.com
Fri Jun 29 09:45:37 BST 2007
On 29/06/07, Martin Pool <mbp at sourcefrog.net> wrote:
> 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.
I've not traced through exactly what's happening when yet, but that
seems not to be needed.
> > 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.
Right, this was my worry about moving the change any deeper. As it's
valid to continue to using relative paths, moving upwards unexpectedly
could subtly break things.
> 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.
This is an idea though, spreads the risk better. Still a bit of
overhead, but directory unlinking is not on any critical paths outside
the testsuite, is it?
Best solution really is solid test coverage and regularly ensuring
everything passes on all target platforms.
> 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.
Yes, I have half an aim of getting the rest of selftest cleaned up
fail free, if I can manage it without finding out too much more about
locking differences between windows and nix... Most of the remaining
issues seem tackleable, though I've not investigated why it's skipping
so much yet.
Apologies for the dodgy patch by the way, 'd expect me to get the
paths balanced correctly with such huge changes. I've not worked out a
good way of working with live changes to packages yet. I guess I need
to branch from my local bzr.dev to edit then just keep running
setup.py from there each change.
Martin
More information about the bazaar
mailing list