gnu: dejagnu: Use 'modify-phases' syntax.
* gnu/packages/dejagnu.scm (dejagnu)[arguments]: Use 'modify-phases' syntax.
This commit is contained in:
parent
539ab1afdd
commit
72d6655c55
|
@ -1,5 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
|
||||||
|
;;; Copyright © 2016 Efraim Flashner <efraim@flasher.co.il>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -38,41 +39,39 @@
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(inputs `(("expect" ,expect)))
|
(inputs `(("expect" ,expect)))
|
||||||
(arguments
|
(arguments
|
||||||
'(#:phases (alist-replace
|
'(#:phases
|
||||||
'check
|
(modify-phases %standard-phases
|
||||||
(lambda _
|
(replace 'check
|
||||||
;; Note: The test-suite *requires* /dev/pts among the
|
(lambda _
|
||||||
;; `build-chroot-dirs' of the build daemon when
|
;; Note: The test-suite *requires* /dev/pts among the
|
||||||
;; building in a chroot. See
|
;; `build-chroot-dirs' of the build daemon when
|
||||||
;; <http://thread.gmane.org/gmane.linux.distributions.nixos/1036>
|
;; building in a chroot. See
|
||||||
;; for details.
|
;; <http://thread.gmane.org/gmane.linux.distributions.nixos/1036>
|
||||||
(if (and (directory-exists? "/dev/pts")
|
;; for details.
|
||||||
(directory-exists? "/proc"))
|
(if (and (directory-exists? "/dev/pts")
|
||||||
(begin
|
(directory-exists? "/proc"))
|
||||||
;; Provide `runtest' with a log name, otherwise
|
(begin
|
||||||
;; it tries to run `whoami', which fails when in
|
;; Provide `runtest' with a log name, otherwise it
|
||||||
;; a chroot.
|
;; tries to run `whoami', which fails when in a chroot.
|
||||||
(setenv "LOGNAME" "guix-builder")
|
(setenv "LOGNAME" "guix-builder")
|
||||||
|
|
||||||
;; The test-suite needs to have a non-empty stdin:
|
;; The test-suite needs to have a non-empty stdin:
|
||||||
;; <http://lists.gnu.org/archive/html/bug-dejagnu/2003-06/msg00002.html>.
|
;; <http://lists.gnu.org/archive/html/bug-dejagnu/2003-06/msg00002.html>.
|
||||||
(zero?
|
(zero?
|
||||||
(system "make check < /dev/zero")))
|
(system "make check < /dev/zero")))
|
||||||
(begin
|
(begin
|
||||||
(display "test suite cannot be run, skipping\n")
|
(display "test suite cannot be run, skipping\n")
|
||||||
#t)))
|
#t))))
|
||||||
(alist-cons-after
|
(add-after 'install 'post-install
|
||||||
'install 'post-install
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
;; Use the right `expect' binary.
|
||||||
;; Use the right `expect' binary.
|
(let ((out (assoc-ref outputs "out"))
|
||||||
(let ((out (assoc-ref outputs "out"))
|
(expect (assoc-ref inputs "expect")))
|
||||||
(expect (assoc-ref inputs "expect")))
|
(substitute* (string-append out "/bin/runtest")
|
||||||
(substitute* (string-append out "/bin/runtest")
|
(("^mypath.*$" all)
|
||||||
(("^mypath.*$" all)
|
(string-append all
|
||||||
(string-append all
|
"export PATH="
|
||||||
"export PATH="
|
expect "/bin:$PATH\n")))))))))
|
||||||
expect "/bin:$PATH\n")))))
|
|
||||||
%standard-phases))))
|
|
||||||
(home-page
|
(home-page
|
||||||
"https://www.gnu.org/software/dejagnu/")
|
"https://www.gnu.org/software/dejagnu/")
|
||||||
(synopsis "GNU software testing framework")
|
(synopsis "GNU software testing framework")
|
||||||
|
|
Loading…
Reference in New Issue