tests: Use our own bootstrap tools.

* tests/builders.scm (%bootstrap-inputs): Use %BOOT0-INPUTS from the distro.
* tests/packages.scm (%bootstrap-inputs): Likewise.
* tests/derivations.scm (%coreutils): Alias for %BOOTSTRAP-COREUTILS&CO.
This commit is contained in:
Ludovic Courtès 2012-10-28 01:58:39 +02:00
parent 9144af5aa7
commit 8f3ecbd715
3 changed files with 18 additions and 15 deletions

View File

@ -24,6 +24,8 @@
#:use-module (guix store) #:use-module (guix store)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (guix derivations) #:use-module (guix derivations)
#:use-module ((guix packages) #:select (package-derivation))
#:use-module (ice-9 match)
#:use-module (srfi srfi-1) #:use-module (srfi srfi-1)
#:use-module (srfi srfi-64)) #:use-module (srfi srfi-64))
@ -33,12 +35,14 @@
(false-if-exception (open-connection))) (false-if-exception (open-connection)))
(define %bootstrap-inputs (define %bootstrap-inputs
;; Derivations taken from Nixpkgs, so that the initial tests don't ;; Use the bootstrap inputs so it doesn't take ages to run these tests.
;; take forever. ;; This still involves building Make, Diffutils, and Findutils.
(and (file-exists? (%nixpkgs-directory)) ;; XXX: We're relying on the higher-level `package-derivations' here.
`(("make" ,(nixpkgs-derivation "gnumake")) (and %store
("diffutils" ,(nixpkgs-derivation "diffutils")) (map (match-lambda
,@(@@ (distro packages base) %bootstrap-inputs)))) ((name package)
(list name (package-derivation %store package))))
(@@ (distro packages base) %boot0-inputs))))
(define %bootstrap-guile (define %bootstrap-guile
(@@ (distro packages base) %bootstrap-guile)) (@@ (distro packages base) %bootstrap-guile))
@ -60,8 +64,6 @@
(and (build-system? gnu-build-system) (and (build-system? gnu-build-system)
(eq? gnu-build (build-system-builder gnu-build-system)))) (eq? gnu-build (build-system-builder gnu-build-system))))
(test-skip (if (file-exists? (%nixpkgs-directory)) 1 0))
(test-assert "gnu-build" (test-assert "gnu-build"
(let* ((url "http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz") (let* ((url "http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz")
(hash (nix-base32-string->bytevector (hash (nix-base32-string->bytevector

View File

@ -205,7 +205,11 @@
(define %coreutils (define %coreutils
(false-if-exception (nixpkgs-derivation "coreutils"))) (false-if-exception
(or (package-derivation %store
(@@ (distro packages base)
%bootstrap-coreutils&co))
(nixpkgs-derivation "coreutils"))))
(test-skip (if %coreutils 0 1)) (test-skip (if %coreutils 0 1))

View File

@ -36,12 +36,9 @@
(false-if-exception (open-connection))) (false-if-exception (open-connection)))
(define %bootstrap-inputs (define %bootstrap-inputs
;; Derivations taken from Nixpkgs, so that the initial tests don't ;; Use the bootstrap inputs so it doesn't take ages to run these tests.
;; take forever. ;; This still involves building GNU Make and GNU Diffutils.
(and (file-exists? (%nixpkgs-directory)) (@@ (distro packages base) %boot0-inputs))
`(("make" ,(nixpkgs-derivation "gnumake"))
("diffutils" ,(nixpkgs-derivation "diffutils"))
,@(@@ (distro packages base) %bootstrap-inputs))))
(define %bootstrap-guile (define %bootstrap-guile
(@@ (distro packages base) %bootstrap-guile)) (@@ (distro packages base) %bootstrap-guile))