gnu: emacs-svg-icon: Fix grammar.
[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>
f97cb249 4;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
4a219a1a
LC
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
1ffa7090 21(define-module (gnu packages dejagnu)
4a219a1a
LC
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (guix licenses)
1ffa7090 26 #:use-module (gnu packages tcl))
4a219a1a
LC
27
28(define-public dejagnu
29 (package
30 (name "dejagnu")
3c2ebce6 31 (version "1.6.2")
4a219a1a
LC
32 (source
33 (origin
34 (method url-fetch)
35 (uri (string-append "mirror://gnu/dejagnu/dejagnu-"
36 version ".tar.gz"))
37 (sha256
38 (base32
3c2ebce6 39 "0qfj2wd4qk1yn9yzam6g8nmyxfazcc0knjyyibycb2ainkhp21hd"))))
4a219a1a
LC
40 (build-system gnu-build-system)
41 (inputs `(("expect" ,expect)))
42 (arguments
72d6655c
EF
43 '(#:phases
44 (modify-phases %standard-phases
45 (replace 'check
46 (lambda _
47 ;; Note: The test-suite *requires* /dev/pts among the
48 ;; `build-chroot-dirs' of the build daemon when
49 ;; building in a chroot. See
50 ;; <http://thread.gmane.org/gmane.linux.distributions.nixos/1036>
51 ;; for details.
52 (if (and (directory-exists? "/dev/pts")
53 (directory-exists? "/proc"))
54 (begin
55 ;; Provide `runtest' with a log name, otherwise it
56 ;; tries to run `whoami', which fails when in a chroot.
57 (setenv "LOGNAME" "guix-builder")
4a219a1a 58
72d6655c
EF
59 ;; The test-suite needs to have a non-empty stdin:
60 ;; <http://lists.gnu.org/archive/html/bug-dejagnu/2003-06/msg00002.html>.
f97cb249
MW
61 (unless (zero? (system "make check < /dev/zero"))
62 (error "make check failed")))
63 (display "test suite cannot be run, skipping\n"))
64 #t))
72d6655c
EF
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="
f97cb249
MW
74 expect "/bin:$PATH\n")))
75 #t))))))
4a219a1a 76 (home-page
539ab1af 77 "https://www.gnu.org/software/dejagnu/")
f50d2669 78 (synopsis "GNU software testing framework")
4a219a1a 79 (description
a22dc0c4
LC
80 "DejaGnu is a framework for testing software. In effect, it serves as
81a front-end for all tests written for a program. Thus, each program can have
79c311b8 82multiple test suites, which are then all managed by a single harness.")
539ab1af 83 (license gpl3+)))