guix-commits
[Top][All Lists]
Advanced

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

01/02: gnu: Add cmdtest.


From: Kei Kebreau
Subject: 01/02: gnu: Add cmdtest.
Date: Sat, 26 Aug 2017 15:49:40 -0400 (EDT)

kkebreau pushed a commit to branch master
in repository guix.

commit cd669fdeb1983361f1a83b7fe56443fc1dc20e8a
Author: Kei Kebreau <address@hidden>
Date:   Thu Jul 6 13:58:35 2017 -0400

    gnu: Add cmdtest.
    
    * gnu/packages/check.scm (cmdtest): New variable.
    
    Co-authored-by: Arun Isaac <address@hidden>
---
 gnu/packages/check.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index db11d93..008dfc1 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2016 Roel Janssen <address@hidden>
 ;;; Copyright © 2016 Lukas Gradl <address@hidden>
 ;;; Copyright © 2017 Mathieu Othacehe <address@hidden>
+;;; Copyright © 2017 Kei Kebreau <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -34,6 +35,7 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
   #:use-module (guix build-system trivial))
 
 (define-public check
@@ -154,6 +156,51 @@ supervised tests.")
 multi-paradigm automated test framework for C++ and Objective-C.")
     (license boost1.0)))
 
+(define-public cmdtest
+  (package
+    (name "cmdtest")
+    (version "0.29")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://git.liw.fi/cmdtest/snapshot/";
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1i6gi4yp4qqx1liax098c7nwdb24pghh11xqlrcs7lnhh079rqhb"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         ;; check phase needs to be run before the build phase. If not, the
+         ;; coverage test runner looks for tests for the built source files,
+         ;; and fails.
+         (delete 'check)
+         (add-before 'build 'check
+           (lambda _
+             (substitute* "yarn"
+               (("/bin/sh") (which "sh")))
+             ;; yarn uses python2-ttystatus to print messages.
+             ;; python2-ttystatus requires /dev/tty which is not present in
+             ;; the build environment. Hence assuming-failure test fails.
+             (delete-file "yarn.tests/assuming-failure.script")
+             (delete-file "yarn.tests/assuming-failure.stdout")
+             (zero? (system* "python" "setup.py" "check")))))))
+    (native-inputs
+     `(("python2-coverage-test-runner" ,python2-coverage-test-runner)))
+    (propagated-inputs
+     `(("python2-cliapp" ,python2-cliapp)
+       ("python2-markdown" ,python2-markdown)
+       ("python2-ttystatus" ,python2-ttystatus)))
+    (home-page "https://liw.fi/cmdtest/";)
+    (synopsis "Black box Unix program tester")
+    (description
+     "@code{cmdtest} black box tests Unix command line tools.  Roughly, it is
+given a command line and input files, and the expected output, and it verifies
+that the command line produces the expected output.  If not, it reports a
+problem, and shows the differences.")
+    (license gpl3+)))
+
 (define-public cmocka
   (package
     (name "cmocka")



reply via email to

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