gnu: src: Respect #:tests? argument.

* gnu/packages/version-control.scm (src)[arguments]: Skip the 'check
phase when #:tests? is false.

Change-Id: Ic39cdb1e9a158d16d022f6e41a954b567731b124
This commit is contained in:
Tobias Geerinckx-Rice 2024-09-29 02:00:00 +02:00
parent b1df929e1b
commit a47d7af227
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -3449,11 +3449,12 @@ (define-public src
(wrap-program prog
`("PATH" ":" prefix (,(dirname rcs)))))))
(replace 'check
(lambda _
(setenv "HOME" (getenv "TMPDIR"))
(invoke "git" "config" "--global" "user.name" "guix")
(invoke "git" "config" "--global" "user.email" "guix")
(invoke "./srctest"))))))
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(setenv "HOME" (getenv "TMPDIR"))
(invoke "git" "config" "--global" "user.name" "guix")
(invoke "git" "config" "--global" "user.email" "guix")
(invoke "./srctest")))))))
(native-inputs
(list asciidoc
;; For testing.