diff options
author | Kei Kebreau <kei@openmailbox.org> | 2017-07-06 13:58:35 -0400 |
---|---|---|
committer | Kei Kebreau <kei@openmailbox.org> | 2017-08-26 15:26:45 -0400 |
commit | cd669fdeb1983361f1a83b7fe56443fc1dc20e8a (patch) | |
tree | 00edea0649092201924c8319c7a7df81f14ba627 /gnu/packages/check.scm | |
parent | 72e2815d18ad688b0a16ce3b3efba1172423cec4 (diff) | |
download | guix-cd669fdeb1983361f1a83b7fe56443fc1dc20e8a.tar guix-cd669fdeb1983361f1a83b7fe56443fc1dc20e8a.tar.gz |
gnu: Add cmdtest.
* gnu/packages/check.scm (cmdtest): New variable.
Co-authored-by: Arun Isaac <arunisaac@systemreboot.net>
Diffstat (limited to 'gnu/packages/check.scm')
-rw-r--r-- | gnu/packages/check.scm | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index db11d93bef..008dfc1ccd 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2016 Roel Janssen <roel@gnu.org> ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org> ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2017 Kei Kebreau <kei@openmailbox.org> ;;; ;;; 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") |