tests: Adjust tests for new bootstrap Guile.
This is a followup to commit 5d6792f ("gnu: bootstrap: Create a wrapper for guile to set the system load path.") * tests/size.scm ("store-profile"): Expect profile of 'bash' bootstrap binary. * tests/gexp.scm ("gexp->derivation #:references-graphs"): Expect GUILE-DRV to depend on 'bash' bootstrap binary.
This commit is contained in:
parent
aa7251176f
commit
686784d0b9
@ -536,6 +536,9 @@
|
|||||||
(guix build utils))))
|
(guix build utils))))
|
||||||
(ok? (built-derivations (list drv)))
|
(ok? (built-derivations (list drv)))
|
||||||
(guile-drv (package->derivation %bootstrap-guile))
|
(guile-drv (package->derivation %bootstrap-guile))
|
||||||
|
(bash (interned-file (search-bootstrap-binary "bash"
|
||||||
|
(%current-system))
|
||||||
|
"bash" #:recursive? #t))
|
||||||
(g-one -> (derivation->output-path drv "one"))
|
(g-one -> (derivation->output-path drv "one"))
|
||||||
(g-two -> (derivation->output-path drv "two"))
|
(g-two -> (derivation->output-path drv "two"))
|
||||||
(g-guile -> (derivation->output-path drv)))
|
(g-guile -> (derivation->output-path drv)))
|
||||||
@ -543,8 +546,10 @@
|
|||||||
(equal? (call-with-input-file g-one read) (list one))
|
(equal? (call-with-input-file g-one read) (list one))
|
||||||
(equal? (call-with-input-file g-two read)
|
(equal? (call-with-input-file g-two read)
|
||||||
(list one (derivation->output-path two "chbouib")))
|
(list one (derivation->output-path two "chbouib")))
|
||||||
|
|
||||||
|
;; Note: %BOOTSTRAP-GUILE depends on the bootstrap Bash.
|
||||||
(equal? (call-with-input-file g-guile read)
|
(equal? (call-with-input-file g-guile read)
|
||||||
(list (derivation->output-path guile-drv)))))))
|
(list (derivation->output-path guile-drv) bash))))))
|
||||||
|
|
||||||
(test-assertm "gexp->derivation #:allowed-references"
|
(test-assertm "gexp->derivation #:allowed-references"
|
||||||
(mlet %store-monad ((drv (gexp->derivation "allowed-refs"
|
(mlet %store-monad ((drv (gexp->derivation "allowed-refs"
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix tests)
|
#:use-module (guix tests)
|
||||||
#:use-module (guix scripts size)
|
#:use-module (guix scripts size)
|
||||||
|
#:use-module (gnu packages)
|
||||||
#:use-module (gnu packages bootstrap)
|
#:use-module (gnu packages bootstrap)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
@ -54,9 +55,15 @@
|
|||||||
(built-derivations (list file2))
|
(built-derivations (list file2))
|
||||||
(mlet %store-monad ((profiles (store-profile
|
(mlet %store-monad ((profiles (store-profile
|
||||||
(derivation->output-path file2)))
|
(derivation->output-path file2)))
|
||||||
|
(bash (interned-file
|
||||||
|
(search-bootstrap-binary
|
||||||
|
"bash" (%current-system)) "bash"
|
||||||
|
#:recursive? #t))
|
||||||
(guile (package->derivation %bootstrap-guile)))
|
(guile (package->derivation %bootstrap-guile)))
|
||||||
(define (lookup-profile drv)
|
(define (lookup-profile item)
|
||||||
(find (matching-profile (derivation->output-path drv))
|
(find (matching-profile (if (derivation? item)
|
||||||
|
(derivation->output-path item)
|
||||||
|
item))
|
||||||
profiles))
|
profiles))
|
||||||
|
|
||||||
(letrec-syntax ((match* (syntax-rules (=>)
|
(letrec-syntax ((match* (syntax-rules (=>)
|
||||||
@ -67,15 +74,17 @@
|
|||||||
((_ () body)
|
((_ () body)
|
||||||
body))))
|
body))))
|
||||||
;; Make sure we get all three profiles with sensible values.
|
;; Make sure we get all three profiles with sensible values.
|
||||||
(return (and (= (length profiles) 3)
|
(return (and (= (length profiles) 4)
|
||||||
(match* ((file1 => profile1)
|
(match* ((file1 => profile1)
|
||||||
(file2 => profile2)
|
(file2 => profile2)
|
||||||
(guile => profile3))
|
(guile => profile3)
|
||||||
|
(bash => profile4)) ;dependency of GUILE
|
||||||
(and (> (profile-closure-size profile2) 0)
|
(and (> (profile-closure-size profile2) 0)
|
||||||
(= (profile-closure-size profile2)
|
(= (profile-closure-size profile2)
|
||||||
(+ (profile-self-size profile1)
|
(+ (profile-self-size profile1)
|
||||||
(profile-self-size profile2)
|
(profile-self-size profile2)
|
||||||
(profile-self-size profile3))))))))))))
|
(profile-self-size profile3)
|
||||||
|
(profile-self-size profile4))))))))))))
|
||||||
|
|
||||||
(test-end "size")
|
(test-end "size")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user