diff options
author | Marius Bakke <marius@gnu.org> | 2020-06-10 01:04:21 +0200 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2020-06-14 23:15:21 +0200 |
commit | dcfd1d2caf1e467f6494363fbf11d251d0045fb9 (patch) | |
tree | bf481b8532ba53dd126e037f3ab8739b8a20ce4b /gnu/packages/haskell-apps.scm | |
parent | ddd798364838e5a0083fd65037164e1a92568133 (diff) | |
download | guix-dcfd1d2caf1e467f6494363fbf11d251d0045fb9.tar guix-dcfd1d2caf1e467f6494363fbf11d251d0045fb9.tar.gz |
gnu: Add shelltestrunner.
* gnu/packages/haskell-apps.scm (shelltestrunner): New public variable.
Diffstat (limited to 'gnu/packages/haskell-apps.scm')
-rw-r--r-- | gnu/packages/haskell-apps.scm | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm index 3089c17145..a453ba168c 100644 --- a/gnu/packages/haskell-apps.scm +++ b/gnu/packages/haskell-apps.scm @@ -762,6 +762,58 @@ advanced user's otherwise working script to fail under future circumstances. @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") |