aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2016-10-11 01:35:43 -0400
committerLeo Famulari <leo@famulari.name>2016-10-11 01:51:47 -0400
commitb4f91d0eda9d7296597524af0728ebef6fff1804 (patch)
tree0c5568aca793079c12af75b0c793dea2d12295ea /gnu/packages
parent1df6d73bdf7044ad0818c95969b8872414497682 (diff)
downloadpatches-b4f91d0eda9d7296597524af0728ebef6fff1804.tar
patches-b4f91d0eda9d7296597524af0728ebef6fff1804.tar.gz
gnu: borg: Run the test suite.
* gnu/packages/backup.scm (borg)[native-inputs]: Add python-pytest. [arguments]: Invoke the tests with python-pytest after the install phase. Set HOME=/tmp in the 'set-env' phase.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/backup.scm21
1 files changed, 21 insertions, 0 deletions
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 535d535d9e..ffd7ef4c3e 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -428,7 +428,27 @@ detection, and lossless compression.")
(setenv "BORG_OPENSSL_PREFIX" openssl)
(setenv "BORG_LZ4_PREFIX" lz4)
(setenv "PYTHON_EGG_CACHE" "/tmp")
+ ;; The test 'test_return_codes[python]' fails when
+ ;; HOME=/homeless-shelter.
+ (setenv "HOME" "/tmp")
#t)))
+ ;; The tests need to be run after Borg is installed.
+ (delete 'check)
+ (add-after 'install 'check
+ (lambda _
+ (zero?
+ (system* "py.test" "-v" "--pyargs" "borg.testsuite" "-k"
+ (string-append
+ ;; These tests need to write to '/var'.
+ "not test_get_cache_dir "
+ "and not test_get_keys_dir "
+ ;; These tests assume there is a root user in
+ ;; '/etc/passwd'.
+ "and not test_access_acl "
+ "and not test_default_acl "
+ "and not test_non_ascii_acl "
+ ;; This test needs the unpackaged pytest-benchmark.
+ "and not benchmark")))))
(add-after 'install 'install-doc
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -442,6 +462,7 @@ detection, and lossless compression.")
(native-inputs
`(("python-cython" ,python-cython)
("python-setuptools-scm" ,python-setuptools-scm)
+ ("python-pytest" ,python-pytest)
;; For generating the documentation.
("python-sphinx" ,python-sphinx)
("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))