summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-02-07 22:00:39 +0100
committerMarius Bakke <marius@gnu.org>2022-02-07 23:47:23 +0100
commit31ff6a525d6464463b64d15ad0a602df6a333917 (patch)
treef0d093916c145e135750ae9341174e8d355483b2
parent696e34e7217ed545af0d05c802f70c362a9f8df8 (diff)
gnu: clitest: Use G-expressions.
* gnu/packages/check.scm (clitest)[arguments]: Rewrite as gexp. While here, respect TESTS? in check phase.
-rw-r--r--gnu/packages/check.scm49
1 files changed, 25 insertions, 24 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 7315ebfe5e..5a2304b436 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -220,30 +220,31 @@ source code editors and IDEs.")
"1p745mxiq3hgi3ywfljs5sa1psi06awwjxzw0j9c2xx1b09yqv4a"))))
(build-system gnu-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- ;; This package is distributed as a single shell script and comes
- ;; without a proper build system.
- (delete 'configure)
- (delete 'build)
- (replace 'check
- (lambda _
- (substitute* "test.md"
- ;; One test looks for an error from grep in the form "grep: foo",
- ;; but our grep returns the absolute file name on errors. Adjust
- ;; the test to cope with that.
- (("sed 's/\\^e\\*grep: \\.\\*/")
- "sed 's/.*e*grep: .*/"))
-
- (setenv "HOME" "/tmp")
- (invoke "./clitest" "test.md")))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (install-file "clitest" (string-append out "/bin"))
- (install-file "README.md"
- (string-append out "/share/doc/clitest-"
- ,version))))))))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; This package is distributed as a single shell script and comes
+ ;; without a proper build system.
+ (delete 'configure)
+ (delete 'build)
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (substitute* "test.md"
+ ;; One test looks for an error from grep in the form "grep: foo",
+ ;; but our grep returns the absolute file name on errors. Adjust
+ ;; the test to cope with that.
+ (("sed 's/\\^e\\*grep: \\.\\*/")
+ "sed 's/.*e*grep: .*/"))
+
+ (setenv "HOME" "/tmp")
+ (invoke "./clitest" "test.md"))))
+ (replace 'install
+ (lambda _
+ (install-file "clitest" (string-append #$output "/bin"))
+ (install-file "README.md"
+ (string-append #$output "/share/doc/clitest-"
+ #$(package-version this-package))))))))
(native-inputs
(list perl)) ;for tests
(inputs