nixpkgs/pkgs/tools/backup/duplicity/use-installed-scripts-in-test.patch

50 lines
2.1 KiB
Diff
Raw Normal View History

--- a/setup.py
+++ b/setup.py
@@ -92,10 +92,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):
--- 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])
cmd_list.extend([u"-m", u"coverage", u"run", u"--source=duplicity", u"-p"])
- cmd_list.extend([u"../bin/duplicity"])
+ cmd_list.extend([u"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
@@ -47,9 +47,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))
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))
# The format of the file should be:
# """ERROR 2
--- a/testing/functional/test_rdiffdir.py
+++ b/testing/functional/test_rdiffdir.py
2020-09-06 00:37:32 +01:00
@@ -42,7 +42,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"rdiffdir"])
cmd_list.extend(argstring.split())
cmdline = u" ".join([u'"%s"' % x for x in cmd_list])
self.run_cmd(cmdline)