summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-10-28 01:58:39 +0200
committerLudovic Courtès <ludo@gnu.org>2012-10-28 01:58:39 +0200
commit8f3ecbd7157aa4bf63069d69280351bd04c85eb0 (patch)
tree938beea4c0673199829a8d27cc84f0cd035ed820 /tests
parent9144af5aa7b757b1dacd3f39ebdac8a31bc36e9f (diff)
downloadguix-8f3ecbd7157aa4bf63069d69280351bd04c85eb0.tar.gz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/builders.scm18
-rw-r--r--tests/derivations.scm6
-rw-r--r--tests/packages.scm9
3 files changed, 18 insertions, 15 deletions
diff --git a/tests/builders.scm b/tests/builders.scm
index 629c88c1e5..8d2d75aa7f 100644
--- a/tests/builders.scm
+++ b/tests/builders.scm
@@ -24,6 +24,8 @@
   #:use-module (guix store)
   #:use-module (guix utils)
   #: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-64))
 
@@ -33,12 +35,14 @@
   (false-if-exception (open-connection)))
 
 (define %bootstrap-inputs
-  ;; Derivations taken from Nixpkgs, so that the initial tests don't
-  ;; take forever.
-  (and (file-exists? (%nixpkgs-directory))
-       `(("make" ,(nixpkgs-derivation "gnumake"))
-         ("diffutils" ,(nixpkgs-derivation "diffutils"))
-         ,@(@@ (distro packages base) %bootstrap-inputs))))
+  ;; Use the bootstrap inputs so it doesn't take ages to run these tests.
+  ;; This still involves building Make, Diffutils, and Findutils.
+  ;; XXX: We're relying on the higher-level `package-derivations' here.
+  (and %store
+       (map (match-lambda
+             ((name package)
+              (list name (package-derivation %store package))))
+            (@@ (distro packages base) %boot0-inputs))))
 
 (define %bootstrap-guile
   (@@ (distro packages base) %bootstrap-guile))
@@ -60,8 +64,6 @@
   (and (build-system? 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"
   (let* ((url      "http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz")
          (hash     (nix-base32-string->bytevector
diff --git a/tests/derivations.scm b/tests/derivations.scm
index 0a785f1b2a..2497fa8ec6 100644
--- a/tests/derivations.scm
+++ b/tests/derivations.scm
@@ -205,7 +205,11 @@
 
 
 (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))
 
diff --git a/tests/packages.scm b/tests/packages.scm
index ff23a7bf41..005e605e83 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -36,12 +36,9 @@
   (false-if-exception (open-connection)))
 
 (define %bootstrap-inputs
-  ;; Derivations taken from Nixpkgs, so that the initial tests don't
-  ;; take forever.
-  (and (file-exists? (%nixpkgs-directory))
-       `(("make" ,(nixpkgs-derivation "gnumake"))
-         ("diffutils" ,(nixpkgs-derivation "diffutils"))
-         ,@(@@ (distro packages base) %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))
 
 (define %bootstrap-guile
   (@@ (distro packages base) %bootstrap-guile))