2021-07-11 14:00:00 +02:00
|
|
|
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
|
2019-05-04 02:16:54 +02:00
|
|
|
--- a/setup.py
|
|
|
|
+++ b/setup.py
|
2021-07-11 14:00:00 +02:00
|
|
|
@@ -205,10 +205,6 @@ class TestCommand(test):
|
2019-05-04 02:16:54 +02:00
|
|
|
except Exception:
|
|
|
|
pass
|
2021-07-11 14:00:00 +02:00
|
|
|
|
2020-01-05 17:01:50 +01:00
|
|
|
- os.environ[u'PATH'] = u"%s:%s" % (
|
2019-05-04 02:16:54 +02:00
|
|
|
- os.path.abspath(build_scripts_cmd.build_dir),
|
2020-01-05 17:01:50 +01:00
|
|
|
- os.environ.get(u'PATH'))
|
2019-05-04 02:16:54 +02:00
|
|
|
-
|
|
|
|
test.run(self)
|
2021-07-11 14:00:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
diff --git a/testing/functional/__init__.py b/testing/functional/__init__.py
|
|
|
|
index 4221576d..3cf44945 100644
|
2020-01-05 17:01:50 +01:00
|
|
|
--- a/testing/functional/__init__.py
|
|
|
|
+++ b/testing/functional/__init__.py
|
2021-07-11 14:00:00 +02:00
|
|
|
@@ -111,7 +111,7 @@ class FunctionalTestCase(DuplicityTestCase):
|
|
|
|
run_coverage = os.environ.get(u'RUN_COVERAGE', None)
|
|
|
|
if run_coverage is not None:
|
2020-01-05 17:01:50 +01:00
|
|
|
cmd_list.extend([u"-m", u"coverage", u"run", u"--source=duplicity", u"-p"])
|
2021-07-11 14:00:00 +02:00
|
|
|
- cmd_list.extend([u"{0}/bin/duplicity".format(_top_dir)])
|
2020-01-05 17:01:50 +01:00
|
|
|
+ cmd_list.extend([u"duplicity"])
|
|
|
|
cmd_list.extend(options)
|
|
|
|
cmd_list.extend([u"-v0"])
|
|
|
|
cmd_list.extend([u"--no-print-statistics"])
|
2021-07-11 14:00:00 +02:00
|
|
|
diff --git a/testing/functional/test_log.py b/testing/functional/test_log.py
|
|
|
|
index 9dfc86a6..b9cb55db 100644
|
2020-01-05 17:01:50 +01:00
|
|
|
--- a/testing/functional/test_log.py
|
|
|
|
+++ b/testing/functional/test_log.py
|
2021-07-11 14:00:00 +02:00
|
|
|
@@ -49,9 +49,9 @@ class LogTest(FunctionalTestCase):
|
2020-01-05 17:01:50 +01:00
|
|
|
# Run actual duplicity command (will fail, because no arguments passed)
|
|
|
|
basepython = os.environ.get(u'TOXPYTHON', None)
|
|
|
|
if basepython is not None:
|
2021-07-11 14:00:00 +02:00
|
|
|
- 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))
|
2020-01-05 17:01:50 +01:00
|
|
|
else:
|
2021-07-11 14:00:00 +02:00
|
|
|
- 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))
|
2020-01-05 17:01:50 +01:00
|
|
|
|
|
|
|
# The format of the file should be:
|
|
|
|
# """ERROR 2
|
2021-07-11 14:00:00 +02:00
|
|
|
diff --git a/testing/functional/test_rdiffdir.py b/testing/functional/test_rdiffdir.py
|
|
|
|
index 0cbfdb33..47acd029 100644
|
2020-01-05 17:01:50 +01:00
|
|
|
--- a/testing/functional/test_rdiffdir.py
|
|
|
|
+++ b/testing/functional/test_rdiffdir.py
|
2021-07-11 14:00:00 +02:00
|
|
|
@@ -44,7 +44,7 @@ class RdiffdirTest(FunctionalTestCase):
|
2020-09-06 01:37:32 +02:00
|
|
|
basepython = os.environ.get(u'TOXPYTHON', None)
|
|
|
|
if basepython is not None:
|
|
|
|
cmd_list.extend([basepython])
|
2021-07-11 14:00:00 +02:00
|
|
|
- cmd_list.extend([u"{0}/bin/rdiffdir".format(_top_dir)])
|
2020-09-06 01:37:32 +02:00
|
|
|
+ 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)
|