| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 |
|
| 23 | (define-module (gnu packages dejagnu)
|
| 24 | #:use-module (guix packages)
|
| 25 | #:use-module (guix download)
|
| 26 | #:use-module (guix gexp)
|
| 27 | #:use-module (guix build-system gnu)
|
| 28 | #:use-module (guix licenses)
|
| 29 | #:use-module (gnu packages bash)
|
| 30 | #:use-module (gnu packages tcl))
|
| 31 |
|
| 32 | (define-public dejagnu
|
| 33 | (package
|
| 34 | (name "dejagnu")
|
| 35 | (version "1.6.3")
|
| 36 | (source
|
| 37 | (origin
|
| 38 | (method url-fetch)
|
| 39 | (uri (string-append "mirror://gnu/dejagnu/dejagnu-"
|
| 40 | version ".tar.gz"))
|
| 41 | (sha256
|
| 42 | (base32
|
| 43 | "1qx2cv6qkxbiqg87jh217jb62hk3s7dmcs4cz1llm2wmsynfznl7"))))
|
| 44 | (build-system gnu-build-system)
|
| 45 | (inputs (list bash-minimal expect))
|
| 46 | (arguments
|
| 47 | (list
|
| 48 | |
| 49 | |
| 50 | #:out-of-source? #true
|
| 51 | #:phases
|
| 52 | #~(modify-phases %standard-phases
|
| 53 | (add-after 'unpack 'patch-/bin/sh
|
| 54 | (lambda* (#:key inputs #:allow-other-keys)
|
| 55 | |
| 56 | (let ((/bin/sh (search-input-file inputs "/bin/sh")))
|
| 57 | (substitute* "dejagnu"
|
| 58 | (("exec /bin/sh")
|
| 59 | (string-append "exec " /bin/sh)))
|
| 60 | (substitute* (find-files "testsuite/report-card.all")
|
| 61 | (("/bin/sh") /bin/sh)))))
|
| 62 | (replace 'check
|
| 63 | (lambda* (#:key tests? #:allow-other-keys)
|
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | (when tests?
|
| 70 | (if (and (directory-exists? "/dev/pts")
|
| 71 | (directory-exists? "/proc"))
|
| 72 | (begin
|
| 73 | |
| 74 | |
| 75 | (setenv "LOGNAME" "guix-builder")
|
| 76 |
|
| 77 | |
| 78 | |
| 79 | (unless (zero? (system "make check < /dev/zero"))
|
| 80 | (error "make check failed")))
|
| 81 | (display "test suite cannot be run, skipping\n")))))
|
| 82 | (add-after 'install 'post-install
|
| 83 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 84 | |
| 85 | (let ((expect (search-input-file inputs "/bin/expect")))
|
| 86 | (substitute* (string-append #$output "/bin/runtest")
|
| 87 | (("^mypath.*$" all)
|
| 88 | (string-append all
|
| 89 | "export PATH="
|
| 90 | (dirname expect) ":$PATH\n")))))))))
|
| 91 | (home-page "https://www.gnu.org/software/dejagnu/")
|
| 92 | (synopsis "GNU software testing framework")
|
| 93 | (description
|
| 94 | "DejaGnu is a framework for testing software. In effect, it serves as
|
| 95 | a front-end for all tests written for a program. Thus, each program can have
|
| 96 | multiple test suites, which are then all managed by a single harness.")
|
| 97 | (license gpl3+)))
|