[MERGE] Progress on passing the full test suite on OSX

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Sep 21 13:17:57 BST 2007

>>>>> "martin" == Martin Pool <mbp at canonical.com> writes:

    martin> Martin Pool has voted tweak.
    martin> Status is now: Conditionally approved
    martin> Comment:
    martin> Thanks for doing this, getting at least everything to a diagnosed
    martin> xfail would be a good step forward.

    martin> +    def assertIsSameRealPath(self, path1, path2):
    martin> +        """Fail if path1 and path2 points to different files"""
    martin> +        self.assertEqual(bzrlib.osutils.realpath(path1),
    martin> +                         bzrlib.osutils.realpath(path2))
    martin> +

    martin> (comment) Maybe this should give more of a message if they fail,
    martin> with both the apparent and real paths?  Maybe it'll be obvious.


    martin>          if sys.platform == 'darwin':
    martin> +            from bzrlib.workingtree import WorkingTree3
    martin> +            if type(self.tree1) is WorkingTree3:
    martin> +                self.knownFailure("Mac OSX doesn't preserve unicode"
    martin> +                                  " combining characters"
    martin> +                                  " and WorkingTree3 failed to detect"
    martin> +                                  " removed files")
    martin> +

    martin> Can you include a bug number for this please, if there is one?

Done: https://bugs.edge.launchpad.net/bzr/+bug/141438

    martin>      def test__remote_path(self):
    martin> +        if sys.platform == 'darwin':
    martin> +            self.knownFailure('Mac OSX symlinks /tmp to /private/tmp,'
    martin> +                              ' testing against self.test_dir'
    martin> +                              ' is not appropriate')

    martin> I understand that it does this linking, but I don't understand
    martin> why it's not appropriate.

The test is about sftp absolute path handling. There is already
(in this test) a TODO about windows needing an absolute path
without drive letter. To me, using self.test_dir was a trick to
get an absolute path for comparison purposes. 

That fails for OSX because the sftp server don't resolve the
links (and it doesn't have to).

So I'd say the test should be rewritten. My focus was on making
the test suite passing and I didn't feel like rethinking the
whole test.

I can remove the knownFailure and put a comment instead but I
think eyes will be more easily caught with a knownFailure.

I'll merge with the first two points modified as described here.


More information about the bazaar mailing list