guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/08: gnu: Add shelltestrunner.


From: guix-commits
Subject: 04/08: gnu: Add shelltestrunner.
Date: Sun, 14 Jun 2020 17:17:04 -0400 (EDT)

mbakke pushed a commit to branch master
in repository guix.

commit dcfd1d2caf1e467f6494363fbf11d251d0045fb9
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Wed Jun 10 01:04:21 2020 +0200

    gnu: Add shelltestrunner.
    
    * gnu/packages/haskell-apps.scm (shelltestrunner): New public variable.
---
 gnu/packages/haskell-apps.scm | 52 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm
index 3089c17..a453ba1 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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]