gnu: r-scran: Update to 1.8.2.
[jackhill/guix/guix.git] / gnu / packages / dejagnu.scm
CommitLineData
4a219a1a
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
30ee6bf5 3;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flasher.co.il>
4a219a1a
LC
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
1ffa7090 20(define-module (gnu packages dejagnu)
4a219a1a
LC
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu)
24 #:use-module (guix licenses)
1ffa7090 25 #:use-module (gnu packages tcl))
4a219a1a
LC
26
27(define-public dejagnu
28 (package
29 (name "dejagnu")
30ee6bf5 30 (version "1.6.1")
4a219a1a
LC
31 (source
32 (origin
33 (method url-fetch)
34 (uri (string-append "mirror://gnu/dejagnu/dejagnu-"
35 version ".tar.gz"))
36 (sha256
37 (base32
30ee6bf5 38 "14hnq1mh91vqprc43xdy4f15sycw6fbajrh7zi6cw2kyg6xjhnxz"))))
4a219a1a
LC
39 (build-system gnu-build-system)
40 (inputs `(("expect" ,expect)))
41 (arguments
72d6655c
EF
42 '(#:phases
43 (modify-phases %standard-phases
44 (replace 'check
45 (lambda _
46 ;; Note: The test-suite *requires* /dev/pts among the
47 ;; `build-chroot-dirs' of the build daemon when
48 ;; building in a chroot. See
49 ;; <http://thread.gmane.org/gmane.linux.distributions.nixos/1036>
50 ;; for details.
51 (if (and (directory-exists? "/dev/pts")
52 (directory-exists? "/proc"))
53 (begin
54 ;; Provide `runtest' with a log name, otherwise it
55 ;; tries to run `whoami', which fails when in a chroot.
56 (setenv "LOGNAME" "guix-builder")
4a219a1a 57
72d6655c
EF
58 ;; The test-suite needs to have a non-empty stdin:
59 ;; <http://lists.gnu.org/archive/html/bug-dejagnu/2003-06/msg00002.html>.
60 (zero?
61 (system "make check < /dev/zero")))
62 (begin
63 (display "test suite cannot be run, skipping\n")
64 #t))))
65 (add-after 'install 'post-install
66 (lambda* (#:key inputs outputs #:allow-other-keys)
67 ;; Use the right `expect' binary.
68 (let ((out (assoc-ref outputs "out"))
69 (expect (assoc-ref inputs "expect")))
70 (substitute* (string-append out "/bin/runtest")
71 (("^mypath.*$" all)
72 (string-append all
73 "export PATH="
74 expect "/bin:$PATH\n")))))))))
4a219a1a 75 (home-page
539ab1af 76 "https://www.gnu.org/software/dejagnu/")
f50d2669 77 (synopsis "GNU software testing framework")
4a219a1a 78 (description
a22dc0c4
LC
79 "DejaGnu is a framework for testing software. In effect, it serves as
80a front-end for all tests written for a program. Thus, each program can have
79c311b8 81multiple test suites, which are then all managed by a single harness.")
539ab1af 82 (license gpl3+)))