mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 06:06:53 -05:00
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.
This commit is contained in:
parent
1df6d73bdf
commit
b4f91d0eda
1 changed files with 21 additions and 0 deletions
|
@ -428,7 +428,27 @@ (define-public borg
|
||||||
(setenv "BORG_OPENSSL_PREFIX" openssl)
|
(setenv "BORG_OPENSSL_PREFIX" openssl)
|
||||||
(setenv "BORG_LZ4_PREFIX" lz4)
|
(setenv "BORG_LZ4_PREFIX" lz4)
|
||||||
(setenv "PYTHON_EGG_CACHE" "/tmp")
|
(setenv "PYTHON_EGG_CACHE" "/tmp")
|
||||||
|
;; The test 'test_return_codes[python]' fails when
|
||||||
|
;; HOME=/homeless-shelter.
|
||||||
|
(setenv "HOME" "/tmp")
|
||||||
#t)))
|
#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
|
(add-after 'install 'install-doc
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
@ -442,6 +462,7 @@ (define-public borg
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("python-cython" ,python-cython)
|
`(("python-cython" ,python-cython)
|
||||||
("python-setuptools-scm" ,python-setuptools-scm)
|
("python-setuptools-scm" ,python-setuptools-scm)
|
||||||
|
("python-pytest" ,python-pytest)
|
||||||
;; For generating the documentation.
|
;; For generating the documentation.
|
||||||
("python-sphinx" ,python-sphinx)
|
("python-sphinx" ,python-sphinx)
|
||||||
("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
|
("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
|
||||||
|
|
Loading…
Reference in a new issue