tests: Choose a less expensive test for packages.

* tests/packages.scm (%bootstrap-inputs): Remove.
  ("GNU Hello"): Rename to...
  ("GNU Make, bootstrap"): ... this.  Build GNU-MAKE-BOOT0 instead of
  HELLO.
This commit is contained in:
Ludovic Courtès 2012-11-09 23:59:11 +01:00
parent cfeb75954a
commit 9e782349fe
1 changed files with 9 additions and 13 deletions

View File

@ -40,11 +40,6 @@
;; Make sure we build everything by ourselves. ;; Make sure we build everything by ourselves.
(set-build-options %store #:use-substitutes? #f)) (set-build-options %store #:use-substitutes? #f))
(define %bootstrap-inputs
;; Use the bootstrap inputs so it doesn't take ages to run these tests.
;; This still involves building GNU Make and GNU Diffutils.
(@@ (distro packages base) %boot0-inputs))
(test-begin "packages") (test-begin "packages")
@ -113,16 +108,17 @@
(let ((p (pk 'drv d (derivation-path->output-path d)))) (let ((p (pk 'drv d (derivation-path->output-path d))))
(eq? 'hello (call-with-input-file p read)))))) (eq? 'hello (call-with-input-file p read))))))
(test-assert "GNU Hello" (test-assert "GNU Make, bootstrap"
(let ((hello (package-with-explicit-inputs hello %bootstrap-inputs ;; GNU Make is the first program built during bootstrap; we choose it
#:guile %bootstrap-guile))) ;; here so that the test doesn't last for too long.
(and (package? hello) (let ((gnu-make (@@ (distro packages base) gnu-make-boot0)))
(or (location? (package-location hello)) (and (package? gnu-make)
(not (package-location hello))) (or (location? (package-location gnu-make))
(let* ((drv (package-derivation %store hello)) (not (package-location gnu-make)))
(let* ((drv (package-derivation %store gnu-make))
(out (derivation-path->output-path drv))) (out (derivation-path->output-path drv)))
(and (build-derivations %store (list drv)) (and (build-derivations %store (list drv))
(file-exists? (string-append out "/bin/hello"))))))) (file-exists? (string-append out "/bin/make")))))))
(test-assert "find-packages-by-name" (test-assert "find-packages-by-name"
(match (find-packages-by-name "hello") (match (find-packages-by-name "hello")