mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 14:28:15 -05:00
gnu: Add shelltestrunner.
* gnu/packages/haskell-apps.scm (shelltestrunner): New public variable.
This commit is contained in:
parent
ddd7983648
commit
dcfd1d2caf
1 changed files with 52 additions and 0 deletions
|
@ -762,6 +762,58 @@ (define-public shellcheck
|
|||
@end enumerate")
|
||||
(license license:gpl3+)))
|
||||
|
||||
(define-public shelltestrunner
|
||||
(package
|
||||
(name "shelltestrunner")
|
||||
(version "1.9")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://hackage/package/shelltestrunner-"
|
||||
version "/shelltestrunner-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1a5kzqbwg6990249ypw0cx6cqj6663as1kbj8nzblcky8j6kbi6b"))))
|
||||
(build-system haskell-build-system)
|
||||
(arguments
|
||||
'(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(delete 'check)
|
||||
(add-after 'install 'check
|
||||
(lambda* (#:key outputs tests? parallel-tests? #:allow-other-keys)
|
||||
;; This test is inspired by the Makefile in the upstream
|
||||
;; repository, which is missing in the Hackage release tarball
|
||||
;; along with some of the tests. The Makefile would not work
|
||||
;; anyway as it ties into the 'stack' build tool.
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(shelltest (string-append out "/bin/shelltest"))
|
||||
(numjobs (if parallel-tests?
|
||||
(number->string (parallel-job-count))
|
||||
"1")))
|
||||
(if tests?
|
||||
(invoke shelltest (string-append "-j" numjobs)
|
||||
"tests/examples")
|
||||
(format #t "test suite not run~%"))
|
||||
#t))))))
|
||||
(inputs
|
||||
`(("ghc-diff" ,ghc-diff)
|
||||
("ghc-cmdargs" ,ghc-cmdargs)
|
||||
("ghc-filemanip" ,ghc-filemanip)
|
||||
("ghc-hunit" ,ghc-hunit)
|
||||
("ghc-pretty-show" ,ghc-pretty-show)
|
||||
("ghc-regex-tdfa" ,ghc-regex-tdfa)
|
||||
("ghc-safe" ,ghc-safe)
|
||||
("ghc-utf8-string" ,ghc-utf8-string)
|
||||
("ghc-test-framework" ,ghc-test-framework)
|
||||
("ghc-test-framework-hunit" ,ghc-test-framework-hunit)))
|
||||
(home-page "https://github.com/simonmichael/shelltestrunner")
|
||||
(synopsis "Test CLI programs")
|
||||
(description
|
||||
"shelltestrunner (executable: @command{shelltest}) is a command-line tool
|
||||
for testing command-line programs, or general shell commands. It reads simple
|
||||
test specifications defining a command to run, some input, and the expected
|
||||
output, stderr, and exit status.")
|
||||
(license license:gpl3+)))
|
||||
|
||||
(define-public stylish-haskell
|
||||
(package
|
||||
(name "stylish-haskell")
|
||||
|
|
Loading…
Reference in a new issue