[merge] follow up, fix the rest of the mac tests

Robey Pointer robey at lag.net
Tue Jul 4 22:45:51 BST 2006


On 3 Jul 2006, at 11:48, John Arbash Meinel wrote:

> I went ahead and fixed up the rest of the mac tests. It turned out the
> only thing left was to write a new getcwd() for Mac, which returns the
> normalized path. And then track down WorkingTree, since it was  
> directly
> calling os.getcwdu() instead of osutils.getcwd().
>
> Anyway, combining the previous patch with this patch means all tests
> pass on Mac.

The patches don't quite cleanly apply to bzr.dev anymore, so I may  
have messed up in applying them, but this *does* fix all but 2 tests  
on my mbp*:

FAIL: test_rename_current_dir  
(bzrlib.tests.test_osutils.TestWin32FuncsDirs)
FAIL: test_lsprofiling (bzrlib.tests.test_selftest.TestTestResult)

I think these must be new tests so at any rate, I can confirm that  
your patches significantly improve the osx unit tests.  (Before,  
there were over 20 failed tests.)

The traceback for TestWin32FuncsDirs is:

Traceback (most recent call last):
   File "/Users/robey/code/bzr/bzr.dev.mac/bzrlib/tests/ 
test_osutils.py", line 257, in test_rename_current_dir
     self.assertEqual(errno.ENOENT, e.errno)
AssertionError: 2 != 22

(22 is EINVAL.  This is because on osx, rename returns EINVAL when:
      [EINVAL]           From is a parent directory of to, or an  
attempt is
                         made to rename `.' or `..'.
Changing the test to use 'x' instead of '.' fixes it; I just tried.)

The lsprof test fails because the expected string has "*" and stuff  
in it, which lsprof doesn't actually put in the output.  Probably the  
test is just wrong, not specific to osx.

robey


* By mbp I mean "macbook pro", not our illustrious leader. :)





More information about the bazaar mailing list