gnu: gdb: Update to 7.12.
[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>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
1ffa7090 19(define-module (gnu packages dejagnu)
4a219a1a
LC
20 #:use-module (guix packages)
21 #:use-module (guix download)
22 #:use-module (guix build-system gnu)
23 #:use-module (guix licenses)
1ffa7090 24 #:use-module (gnu packages tcl))
4a219a1a
LC
25
26(define-public dejagnu
27 (package
28 (name "dejagnu")
5ac8a1d4 29 (version "1.5.3")
4a219a1a
LC
30 (source
31 (origin
32 (method url-fetch)
33 (uri (string-append "mirror://gnu/dejagnu/dejagnu-"
34 version ".tar.gz"))
35 (sha256
36 (base32
5ac8a1d4 37 "069z3qrdv35cm2sbnfr5yjzplrqj9f61cchxis7j9mm19hv8x6q9"))))
4a219a1a
LC
38 (build-system gnu-build-system)
39 (inputs `(("expect" ,expect)))
40 (arguments
41 '(#:phases (alist-replace
42 'check
43 (lambda _
44 ;; Note: The test-suite *requires* /dev/pts among the
45 ;; `build-chroot-dirs' of the build daemon when
46 ;; building in a chroot. See
47 ;; <http://thread.gmane.org/gmane.linux.distributions.nixos/1036>
48 ;; for details.
49 (if (and (directory-exists? "/dev/pts")
50 (directory-exists? "/proc"))
51 (begin
52 ;; Provide `runtest' with a log name, otherwise
53 ;; it tries to run `whoami', which fails when in
54 ;; a chroot.
55 (setenv "LOGNAME" "guix-builder")
56
57 ;; The test-suite needs to have a non-empty stdin:
58 ;; <http://lists.gnu.org/archive/html/bug-dejagnu/2003-06/msg00002.html>.
59 (zero?
60 (system "make check < /dev/zero")))
61 (begin
62 (display "test suite cannot be run, skipping\n")
63 #t)))
64 (alist-cons-after
65 '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")
75abd8ab
LC
71 (("^mypath.*$" all)
72 (string-append all
73 "export PATH="
74 expect "/bin:$PATH\n")))))
4a219a1a
LC
75 %standard-phases))))
76 (home-page
77 "http://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.")
4a219a1a 83 (license gpl2+)))