aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorJan (janneke) Nieuwenhuizen <janneke@gnu.org>2020-04-24 08:54:43 +0200
committerJan Nieuwenhuizen <janneke@gnu.org>2020-04-26 19:46:27 +0200
commitd653e184ec45cedbc3dc6deb18d3f8666f1c2492 (patch)
treed227ed6d7ed6e3fc88791e120bbd35229025bdc2 /gnu
parentf589cbc4dc4119e3501a0c20822e72cf841d08f3 (diff)
downloadpatches-d653e184ec45cedbc3dc6deb18d3f8666f1c2492.tar
patches-d653e184ec45cedbc3dc6deb18d3f8666f1c2492.tar.gz
gnu: guix: Do not copy bootstrap-guile when cross-compiling.
* gnu/packages/package-management.scm (guix)[arguments]: When cross-compiling, skip copy-bootstrap-guile phase; needed for tests only.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/package-management.scm82
1 files changed, 42 insertions, 40 deletions
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 3bfee16832..1b9697b387 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -181,46 +181,48 @@ $(prefix)/etc/init.d\n")))
(invoke "sh" "bootstrap")))
(add-before 'check 'copy-bootstrap-guile
- (lambda* (#:key system inputs #:allow-other-keys)
- ;; Copy the bootstrap guile tarball in the store used
- ;; by the test suite.
- (define (intern file recursive?)
- ;; Note: don't use 'guix download' here because we
- ;; need to set the 'recursive?' argument.
- (define base
- (strip-store-file-name file))
-
- (define code
- `(begin
- (use-modules (guix))
- (with-store store
- (let* ((item (add-to-store store ,base
- ,recursive?
- "sha256" ,file))
- (root (string-append "/tmp/gc-root-"
- (basename item))))
- ;; Register a root so that the GC tests
- ;; don't delete those.
- (symlink item root)
- (add-indirect-root store root)))))
-
- (invoke "./test-env" "guile" "-c"
- (object->string code)))
-
- (intern (assoc-ref inputs "boot-guile") #f)
-
- ;; On x86_64 some tests need the i686 Guile.
- ,@(if (and (not (%current-target-system))
- (string=? (%current-system)
- "x86_64-linux"))
- '((intern (assoc-ref inputs "boot-guile/i686") #f))
- '())
-
- ;; Copy the bootstrap executables.
- (for-each (lambda (input)
- (intern (assoc-ref inputs input) #t))
- '("bootstrap/bash" "bootstrap/mkdir"
- "bootstrap/tar" "bootstrap/xz"))
+ (lambda* (#:key system target inputs #:allow-other-keys)
+ (unless target
+ (begin
+ ;; Copy the bootstrap guile tarball in the store
+ ;; used by the test suite.
+ (define (intern file recursive?)
+ ;; Note: don't use 'guix download' here because we
+ ;; need to set the 'recursive?' argument.
+ (define base
+ (strip-store-file-name file))
+
+ (define code
+ `(begin
+ (use-modules (guix))
+ (with-store store
+ (let* ((item (add-to-store store ,base
+ ,recursive?
+ "sha256" ,file))
+ (root (string-append "/tmp/gc-root-"
+ (basename item))))
+ ;; Register a root so that the GC tests
+ ;; don't delete those.
+ (symlink item root)
+ (add-indirect-root store root)))))
+
+ (invoke "./test-env" "guile" "-c"
+ (object->string code)))
+
+ (intern (assoc-ref inputs "boot-guile") #f)
+
+ ;; On x86_64 some tests need the i686 Guile.
+ ,@(if (and (not (%current-target-system))
+ (string=? (%current-system)
+ "x86_64-linux"))
+ '((intern (assoc-ref inputs "boot-guile/i686") #f))
+ '())
+
+ ;; Copy the bootstrap executables.
+ (for-each (lambda (input)
+ (intern (assoc-ref inputs input) #t))
+ '("bootstrap/bash" "bootstrap/mkdir"
+ "bootstrap/tar" "bootstrap/xz"))))
#t))
(add-after 'unpack 'disable-failing-tests
;; XXX FIXME: These tests fail within the build container.