You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

85 regels
3.5 KiB

  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. (define-module (gnu packages dejagnu)
  19. #:use-module (guix packages)
  20. #:use-module (guix download)
  21. #:use-module (guix build-system gnu)
  22. #:use-module (guix licenses)
  23. #:use-module (gnu packages tcl))
  24. (define-public dejagnu
  25. (package
  26. (name "dejagnu")
  27. (version "1.5.1")
  28. (source
  29. (origin
  30. (method url-fetch)
  31. (uri (string-append "mirror://gnu/dejagnu/dejagnu-"
  32. version ".tar.gz"))
  33. (sha256
  34. (base32
  35. "1lik8h4qi7x0mhsi8xmj91an1yb63rjbk6v4xrmzgiy5lk8lgrv0"))))
  36. (build-system gnu-build-system)
  37. (inputs `(("expect" ,expect)))
  38. (arguments
  39. '(#:phases (alist-replace
  40. 'check
  41. (lambda _
  42. ;; Note: The test-suite *requires* /dev/pts among the
  43. ;; `build-chroot-dirs' of the build daemon when
  44. ;; building in a chroot. See
  45. ;; <http://thread.gmane.org/gmane.linux.distributions.nixos/1036>
  46. ;; for details.
  47. (if (and (directory-exists? "/dev/pts")
  48. (directory-exists? "/proc"))
  49. (begin
  50. ;; Provide `runtest' with a log name, otherwise
  51. ;; it tries to run `whoami', which fails when in
  52. ;; a chroot.
  53. (setenv "LOGNAME" "guix-builder")
  54. ;; The test-suite needs to have a non-empty stdin:
  55. ;; <http://lists.gnu.org/archive/html/bug-dejagnu/2003-06/msg00002.html>.
  56. (zero?
  57. (system "make check < /dev/zero")))
  58. (begin
  59. (display "test suite cannot be run, skipping\n")
  60. #t)))
  61. (alist-cons-after
  62. 'install 'post-install
  63. (lambda* (#:key inputs outputs #:allow-other-keys)
  64. ;; Use the right `expect' binary.
  65. (let ((out (assoc-ref outputs "out"))
  66. (expect (assoc-ref inputs "expect")))
  67. (substitute* (string-append out "/bin/runtest")
  68. (("^mypath.*$" all)
  69. (string-append all
  70. "export PATH="
  71. expect "/bin:$PATH\n")))))
  72. %standard-phases))))
  73. (home-page
  74. "http://www.gnu.org/software/dejagnu/")
  75. (synopsis "GNU software testing framework")
  76. (description
  77. "DejaGnu is a framework for testing software. In effect, it serves as
  78. a front-end for all tests written for a program. Thus, each program can have
  79. multiple test suites, which are then all managed by a single, so-called \"test
  80. harness.\"")
  81. (license gpl2+)))