0.8 test fails with 'duplicity not found' errors

Bug #1833560 reported by Sebastien Bacher on 2019-06-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Undecided
Unassigned

Bug Description

Trying to get duplicity updated in Debian/Ubuntu, on the Debian request (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929949) the maintainer wrote

'yes. so far i can't make duplicity 0.8.0 work with python 2.7 which is still
the default version in debian and hence important in my opinion.
(by "does not work" i mean: the built-in test suite fails quite a lot'

Trying on Ubuntu Disco to see how it behave the tests fail with a

$ cd /tmp
$ bzr branch lp:duplicity
$ cd duplicity
$ python2.7 setup.py build --force
$ PYTHONPATH=/tmp/duplicity/build/lib.linux-i686-2.7/ python2.7 ./setup.py test
(that's on an i386 chroot, path to adapt for amd64)
...
======================================= test session starts =======================================
platform linux2 -- Python 2.7.16, pytest-4.6.3, py-1.8.0, pluggy-0.12.0
rootdir: /build/duplicity, inifile: tox.ini, testpaths: testing/unit, testing/functional
collected 438 items
...
-------------------------------------- Captured stderr call ---------------------------------------

...command: "setsid" "-w" "duplicity" "full" "testfiles/select2" "file://testfiles/output" "--volsize" "1" "--exclude-filelist=testfiles/exclude.txt" "-v0" "--no-print-statistics" "--allow-source-mismatch" "--archive-dir=testfiles/cache" < /dev/null
...cwd: /build/duplicity/testing
...output:
setsid: failed to execute duplicity: No such file or directory
...return_val: 1

(the same error is hit using python3.7)

az (az-debian) wrote :

root cause for this one: the bad assumption that the duplicity/rdiffdir instance to test is actually in the $PATH.

--- a/testing/functional/__init__.py
+++ b/testing/functional/__init__.py
@@ -101,7 +101,7 @@ class FunctionalTestCase(DuplicityTestCa
                 cmd_list.extend([u"-w"])
         else:
             cmd_list = []
- cmd_list.extend([u"duplicity"])
+ cmd_list.extend([u"../bin/duplicity"])
         cmd_list.extend(options)
         cmd_list.extend([u"-v0"])
         cmd_list.extend([u"--no-print-statistics"])

--- a/testing/functional/test_log.py
+++ b/testing/functional/test_log.py
@@ -39,7 +39,7 @@ class LogTest(FunctionalTestCase):
         u"""Check notification of a simple error code"""

         # Run actual duplicity command (will fail, because no arguments passed)
- os.system(u"duplicity --log-file=/tmp/duplicity.log >/dev/null 2>&1")
+ os.system(u"../bin/duplicity --log-file=/tmp/duplicity.log >/dev/null 2>&1")

         # The format of the file should be:
         # """ERROR 2

--- a/testing/functional/test_rdiffdir.py
+++ b/testing/functional/test_rdiffdir.py
@@ -34,7 +34,7 @@ class RdiffdirTest(FunctionalTestCase):

     def run_rdiffdir(self, argstring):
         u"""Run rdiffdir with given arguments"""
- self.run_cmd(u"rdiffdir " + argstring)
+ self.run_cmd(u"../bin/rdiffdir " + argstring)

     def run_cycle(self, dirname_list):
         u"""Run diff/patch cycle on directories in dirname_list"""

Changed in duplicity:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers