duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] Failure running tests.


From: Scott Hannahs
Subject: Re: [Duplicity-talk] Failure running tests.
Date: Mon, 2 Sep 2019 17:54:08 -0400

Ken,

I am running them under the test phase of “fink”.  I use fink rather than homebrew.

so the test script is the following.  I am not sure if the chmod is still necessary but it used to be.  The build is done while running as an unprivileged user called “fink-bld”. This script should call tox directly and not be an issue.  I am fairly happy that it passed 409 different tests!

TestScript: <<
        #!/bin/sh -ev
        ulimit -n 5120
        chmod 0700 `pwd`/testing/gnupg
        %p/bin/python3.7 setup.py test
<<

I am using the install of python from the 3.7 sources.  I patched duplicity so that every line “#!/bin/env python” was replaced with ‘#!/bin/env python3.7” as I have done in the past for python 2.7.

The python version is 3.7.4.
% python3.7 --version
Python 3.7.4

I heard about the errors in 3.6 and so chose to build under 3.7.  I am running a fairly old OS but python 2.7 is also getting a bit old.

The script above should call tox directly and that is the 3.7 version as far as I can tell.  I can run tox directly if that helps.

% tox --version
3.0.0 imported from /sw/lib/python3.7/site-packages/tox/__init__.py

I wasn’t sure I could attach a file to this list, but I will try with the test log.  There is some fink specific listing as it builds duplicity and then goes straight into the tests.  This file has both he standard and error output redirected to it.  I had some tests fail under python2.7 previously and we never got to the bottom of that.

The OS is Mac OS 10.11.6 and maybe had a flawed installation of unicode?  Or an old unicode missing some newer definitions?  The characters seem to show up in the error output correctly but maybe that is an issue.  However the unicode comparison should be comparing the 4 hex digits of a unicode character and that should work.

Thanks for the help.
-Scott

Attachment: fink-duplicity.txt
Description: Text document


On Sep 2, 2019, at 5:16 PM, Kenneth Loafman <address@hidden> wrote:

Hi Scott,

How are you running the tests?  We recommend just using "tox" as the test driver.

Are you using python37 from homebrew or macports.  I've tested using the homebrew install under 10.14.

You should not be getting any errors on py27 or py37.  There are 4 known errors on py36.

A bit more detail, e.g. full test logs, would help when reporting.

...Thanks,
...Ken


On Mon, Sep 2, 2019 at 3:58 PM Scott Hannahs via Duplicity-talk <address@hidden> wrote:
I am going to reply to my own message.. :-)  Most of the errors were due to my not reading my own build notes. :-(  I have run the tests again and seem to have several errors due to unicode issues which was the big advantage of moving to duplicity 8.  I am down to 17 errors and 3 warnings:
======== 17 failed, 409 passed, 2 skipped, 3 warnings in 894.00 seconds ========


These two errors have me stumped not being a python or unicode expert.  os.py looks reasonable to me and should return a string or path.
b'  File "/sw/src/fink.build/duplicity-0.8.04-1/duplicity-0.8.04/duplicity/path.py", line 476, in <lambda>'
b'    util.maybe_ignore_errors(lambda: os.chown(other.name, self.stat.st_uid, self.stat.st_gid))'
b"PermissionError: [Errno 1] Operation not permitted: b'testfiles/cache/3f6f90580e457c90e7202bc33cd9e363/duplicity-full-signatures.19700102T034640Z.sigtar.gz'"
b'During handling of the above exception, another exception occurred:'
b'Traceback (most recent call last):'
b'  File "../bin/duplicity", line 157, in <module>'
b'    if u"Forced assertion for testing" in util.uexc(e):'
b'  File "/sw/src/fink.build/duplicity-0.8.04-1/duplicity-0.8.04/duplicity/util.py", line 120, in uexc'
b'    return fsdecode(m)'
b'  File "/sw/lib/python3.7/os.py", line 821, in fsdecode'
b'    filename = fspath(filename)  # Does type-checking of `filename`.'
b'TypeError: expected str, bytes or os.PathLike object, not int'
...return_val: 1

So there is a permission error which may be normal since the testing is done in a non-admin account and cannot chown files.  But then there is a secondary error where fsdecode fails.  It looks like os.py does return the path and not an int but someone thinks it is getting a wrong type.

The other errors are also unicode related.
________________ TestUnicode.test_unicode_paths_square_brackets ________________

self = <testing.functional.test_selection.TestUnicode testMethod=test_unicode_paths_square_brackets>

    def test_unicode_paths_square_brackets(self):
        u""" Test --include and --exclude work with unicode paths with character options in []s and [!]s"""
        p = u"testfiles/select-unicode/"
        self.backup(u"full", u"testfiles/select-unicode",
                    options=[u"--exclude", p + u"прыклад/пример/例/Παράδειγμα/उदाहरण.txt",
                             u"--exclude", p + u"пры[к,и,р]лад/пример/例/Παράδειγμα/דוגמא.txt",
                             u"--exclude", p + u"прыклад/пр[!a,b,c]мер/例/მაგალითი/",
                             u"--include", p + u"прыклад/при[g,м,д]ер/例/",
                             u"--exclude", p + u"прыклад/пример/",
                             u"--include", p + u"прыклад/",
                             u"--include", p + u"օրինակ.txt",
                             u"--exclude", p + u"**"])
        self.restore()
        restore_dir = u"testfiles/restore_out"
        restored = self.directory_tree_to_list_of_lists(restore_dir)
        self.assertEqual(restored, [[u"прыклад", u"օրինակ.txt"],
>                                   [u"пример", u"উদাহরণ"], [u"例"], [u"Παράδειγμα"], [u"ઉદાહરણ.log"]])
E       AssertionError: Lists differ: [['пр[48 chars]'], ['Παράδειγμα'], ['דוגמא.txt', 'उदाहरण.txt', 'ઉદાહરણ.log']] != [['пр[48 chars]'], ['Παράδειγμα'], ['ઉદાહરણ.log']]
E       
E       First differing element 3:
E       ['Παράδειγμα']
E       ['Παράδειγμα']
E       
E         [['прыклад', 'օրինակ.txt'],
E          ['пример', 'উদাহরণ'],
E          ['例'],
E       -  ['Παράδειγμα'],
E       ?       ^^
E       
E       +  ['Παράδειγμα'],
E       ?       ^
E       
E       -  ['דוגמא.txt', 'उदाहरण.txt', 'ઉદાહરણ.log']]
E       +  ['ઉદાહરણ.log']]
The strings that are listed as different (element 3) but I am not quite sure what the issue is.  Unicode should be completely cross platform…  That is the point! :-)

-Scott


On Sep 1, 2019, at 5:49 PM, Scott Hannahs via Duplicity-talk <address@hidden> wrote:

Duplicity wizards,

I think I have successfully build duplicity version 0.8.04 on Mac OS X (python 3.7 and Mac OS X 10.11).  This was upgrading from my previous installation using python 2.7.

However the testing phase seems to fail  a  lot of tests.  The first group I understand since there is no tahoe backend installed.  I can live with that and will get around to adding backend support later.


_______________________________________________
Duplicity-talk mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/duplicity-talk


reply via email to

[Prev in Thread] Current Thread [Next in Thread]