me
/
guix
Archived
1
0
Fork 0

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.
master
Jan (janneke) Nieuwenhuizen 2020-04-24 08:54:43 +02:00 committed by Jan Nieuwenhuizen
parent f589cbc4dc
commit d653e184ec
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 37 additions and 35 deletions

View File

@ -181,46 +181,48 @@ $(prefix)/etc/init.d\n")))
(invoke "sh" "bootstrap"))) (invoke "sh" "bootstrap")))
(add-before 'check 'copy-bootstrap-guile (add-before 'check 'copy-bootstrap-guile
(lambda* (#:key system inputs #:allow-other-keys) (lambda* (#:key system target inputs #:allow-other-keys)
;; Copy the bootstrap guile tarball in the store used (unless target
;; by the test suite. (begin
(define (intern file recursive?) ;; Copy the bootstrap guile tarball in the store
;; Note: don't use 'guix download' here because we ;; used by the test suite.
;; need to set the 'recursive?' argument. (define (intern file recursive?)
(define base ;; Note: don't use 'guix download' here because we
(strip-store-file-name file)) ;; need to set the 'recursive?' argument.
(define base
(strip-store-file-name file))
(define code (define code
`(begin `(begin
(use-modules (guix)) (use-modules (guix))
(with-store store (with-store store
(let* ((item (add-to-store store ,base (let* ((item (add-to-store store ,base
,recursive? ,recursive?
"sha256" ,file)) "sha256" ,file))
(root (string-append "/tmp/gc-root-" (root (string-append "/tmp/gc-root-"
(basename item)))) (basename item))))
;; Register a root so that the GC tests ;; Register a root so that the GC tests
;; don't delete those. ;; don't delete those.
(symlink item root) (symlink item root)
(add-indirect-root store root))))) (add-indirect-root store root)))))
(invoke "./test-env" "guile" "-c" (invoke "./test-env" "guile" "-c"
(object->string code))) (object->string code)))
(intern (assoc-ref inputs "boot-guile") #f) (intern (assoc-ref inputs "boot-guile") #f)
;; On x86_64 some tests need the i686 Guile. ;; On x86_64 some tests need the i686 Guile.
,@(if (and (not (%current-target-system)) ,@(if (and (not (%current-target-system))
(string=? (%current-system) (string=? (%current-system)
"x86_64-linux")) "x86_64-linux"))
'((intern (assoc-ref inputs "boot-guile/i686") #f)) '((intern (assoc-ref inputs "boot-guile/i686") #f))
'()) '())
;; Copy the bootstrap executables. ;; Copy the bootstrap executables.
(for-each (lambda (input) (for-each (lambda (input)
(intern (assoc-ref inputs input) #t)) (intern (assoc-ref inputs input) #t))
'("bootstrap/bash" "bootstrap/mkdir" '("bootstrap/bash" "bootstrap/mkdir"
"bootstrap/tar" "bootstrap/xz")) "bootstrap/tar" "bootstrap/xz"))))
#t)) #t))
(add-after 'unpack 'disable-failing-tests (add-after 'unpack 'disable-failing-tests
;; XXX FIXME: These tests fail within the build container. ;; XXX FIXME: These tests fail within the build container.