summary refs log tree commit diff
path: root/pkgs/tools/backup/duplicity/use-installed-scripts-in-test.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/backup/duplicity/use-installed-scripts-in-test.patch')
-rw-r--r--pkgs/tools/backup/duplicity/use-installed-scripts-in-test.patch44
1 files changed, 29 insertions, 15 deletions
diff --git a/pkgs/tools/backup/duplicity/use-installed-scripts-in-test.patch b/pkgs/tools/backup/duplicity/use-installed-scripts-in-test.patch
index c02527cf394..a5ddc4381bd 100644
--- a/pkgs/tools/backup/duplicity/use-installed-scripts-in-test.patch
+++ b/pkgs/tools/backup/duplicity/use-installed-scripts-in-test.patch
@@ -1,48 +1,62 @@
+commit ccd4dd92cd37acce1da20966ad9e4e0c7bcf1709
+Author: Guillaume Girol <symphorien+git@xlumurb.eu>
+Date:   Sun Jul 11 12:00:00 2021 +0000
+
+    use installed duplicity when running tests
+
+diff --git a/setup.py b/setup.py
+index fa474f20..604a242a 100755
 --- a/setup.py
 +++ b/setup.py
-@@ -92,10 +92,6 @@ class TestCommand(test):
+@@ -205,10 +205,6 @@ class TestCommand(test):
                  except Exception:
                      pass
-
+ 
 -        os.environ[u'PATH'] = u"%s:%s" % (
 -            os.path.abspath(build_scripts_cmd.build_dir),
 -            os.environ.get(u'PATH'))
 -
          test.run(self)
-
-     def run_tests(self):
+ 
+ 
+diff --git a/testing/functional/__init__.py b/testing/functional/__init__.py
+index 4221576d..3cf44945 100644
 --- a/testing/functional/__init__.py
 +++ b/testing/functional/__init__.py
-@@ -107,7 +107,7 @@ class FunctionalTestCase(DuplicityTestCase):
-         if basepython is not None:
-             cmd_list.extend([basepython])
+@@ -111,7 +111,7 @@ class FunctionalTestCase(DuplicityTestCase):
+         run_coverage = os.environ.get(u'RUN_COVERAGE', None)
+         if run_coverage is not None:
              cmd_list.extend([u"-m", u"coverage", u"run", u"--source=duplicity", u"-p"])
--        cmd_list.extend([u"../bin/duplicity"])
+-        cmd_list.extend([u"{0}/bin/duplicity".format(_top_dir)])
 +        cmd_list.extend([u"duplicity"])
          cmd_list.extend(options)
          cmd_list.extend([u"-v0"])
          cmd_list.extend([u"--no-print-statistics"])
+diff --git a/testing/functional/test_log.py b/testing/functional/test_log.py
+index 9dfc86a6..b9cb55db 100644
 --- a/testing/functional/test_log.py
 +++ b/testing/functional/test_log.py
-@@ -47,9 +47,9 @@ class LogTest(FunctionalTestCase):
+@@ -49,9 +49,9 @@ class LogTest(FunctionalTestCase):
          # Run actual duplicity command (will fail, because no arguments passed)
          basepython = os.environ.get(u'TOXPYTHON', None)
          if basepython is not None:
--            os.system(u"{} ../bin/duplicity --log-file={} >/dev/null 2>&1".format(basepython, self.logfile))
-+            os.system(u"{} duplicity --log-file={} >/dev/null 2>&1".format(basepython, self.logfile))
+-            os.system(u"{0} {1}/bin/duplicity --log-file={2} >/dev/null 2>&1".format(basepython, _top_dir, self.logfile))
++            os.system(u"{0} duplicity --log-file={1} >/dev/null 2>&1".format(basepython, self.logfile))
          else:
--            os.system(u"../bin/duplicity --log-file={} >/dev/null 2>&1".format(self.logfile))
-+            os.system(u"duplicity --log-file={} >/dev/null 2>&1".format(self.logfile))
+-            os.system(u"{0}/bin/duplicity --log-file={1} >/dev/null 2>&1".format(_top_dir, self.logfile))
++            os.system(u"duplicity --log-file={0} >/dev/null 2>&1".format(self.logfile))
  
          # The format of the file should be:
          # """ERROR 2
+diff --git a/testing/functional/test_rdiffdir.py b/testing/functional/test_rdiffdir.py
+index 0cbfdb33..47acd029 100644
 --- a/testing/functional/test_rdiffdir.py
 +++ b/testing/functional/test_rdiffdir.py
-@@ -42,7 +42,7 @@ class RdiffdirTest(FunctionalTestCase):
+@@ -44,7 +44,7 @@ class RdiffdirTest(FunctionalTestCase):
          basepython = os.environ.get(u'TOXPYTHON', None)
          if basepython is not None:
              cmd_list.extend([basepython])
--        cmd_list.extend([u"../bin/rdiffdir"])
+-        cmd_list.extend([u"{0}/bin/rdiffdir".format(_top_dir)])
 +        cmd_list.extend([u"rdiffdir"])
          cmd_list.extend(argstring.split())
          cmdline = u" ".join([u'"%s"' % x for x in cmd_list])