summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjgart <jgart@dismail.de>2025-12-25 17:39:41 -0500
committerjgart <jgart@dismail.de>2025-12-25 17:45:41 -0500
commit31768a3f461f744fc6a27122fb8aa3c5e8deed91 (patch)
tree55a9d42bcd0ecb5c92f4341df3d46c9749fc9118
parent2be190f98966fc2ddbf0f929b101bbc1fffa0241 (diff)
gnu: borgmatic: Enable all tests.
* gnu/packages/backup.scm (borgmatic): Enable all tests. [source]: Use GitHub source. [arguments]: Enable all tests and format code. Change-Id: Ia05ed054f13fb234fae8571d1c17aa1f99081747
-rw-r--r--gnu/packages/backup.scm55
1 files changed, 29 insertions, 26 deletions
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 019a1d7fc36..257992aa378 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -1212,36 +1212,39 @@ compression parameters used by Gzip.")
(version "2.0.13")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "borgmatic" version))
+ ;; PyPI archive does not contain NEWS file needed for one test.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/borgmatic-collective/borgmatic")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
- (base32 "1dffzbrfbclr1pbzl8d3vvfz7l2v1p3namr3vjl71rnb3y1f7ynh"))))
+ (base32
+ "05w3j4knhsg4w0a0yrz8c7lvz3vp3nf95ddmql9i8mqknjqddm1v"))))
(build-system pyproject-build-system)
(arguments
(list
- #:test-flags
- ;; TODO: Disable failing test.
- #~(list "-k" "not test_borgmatic_version_matches_news_version")
- #:phases #~(modify-phases %standard-phases
- (add-after 'unpack 'configure
- (lambda* (#:key inputs #:allow-other-keys)
- ;; Set absolute store path to borg.
- (substitute* "borgmatic/commands/borgmatic.py"
- (("\\.get\\('local_path', 'borg'\\)")
- (string-append ".get('local_path', '"
- (search-input-file inputs "bin/borg")
- "')")))
- (substitute* "tests/unit/commands/test_borgmatic.py"
- (("(module.get_local_path.+ == )'borg'" all start)
- (string-append start "'"
- (search-input-file inputs "bin/borg")
- "'")))))
- (add-before 'check 'set-path
- (lambda _
- ;; Tests require the installed executable.
- (setenv "PATH"
- (string-append #$output "/bin" ":"
- (getenv "PATH"))))))))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Set absolute store path to borg.
+ (substitute* "borgmatic/commands/borgmatic.py"
+ (("\\.get\\('local_path', 'borg'\\)")
+ (string-append ".get('local_path', '"
+ (search-input-file inputs "bin/borg")
+ "')")))
+ (substitute* "tests/unit/commands/test_borgmatic.py"
+ (("(module.get_local_path.+ == )'borg'" all start)
+ (string-append start "'"
+ (search-input-file inputs "bin/borg")
+ "'")))))
+ (add-before 'check 'set-path
+ (lambda _
+ ;; Tests require the installed executable.
+ (setenv "PATH"
+ (string-append #$output "/bin" ":"
+ (getenv "PATH"))))))))
(native-inputs
(list python-flexmock
python-pytest