summaryrefslogtreecommitdiff
path: root/tests/size.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-07-11 22:37:08 +0200
committerLudovic Courtès <ludo@gnu.org>2015-07-12 01:27:00 +0200
commit686784d0b958478a0fd8a2fbf69755ceea2d27ec (patch)
tree51c14f8b2b9301fcfaa87676ccdcb59d6c8008db /tests/size.scm
parentaa7251176f273d64ec54f71e305d813092bf4c7f (diff)
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.
Diffstat (limited to 'tests/size.scm')
-rw-r--r--tests/size.scm19
1 files changed, 14 insertions, 5 deletions
diff --git a/tests/size.scm b/tests/size.scm
index 95b99a88ef7..a1106045f84 100644
--- a/tests/size.scm
+++ b/tests/size.scm
@@ -24,6 +24,7 @@
24 #:use-module (guix gexp) 24 #:use-module (guix gexp)
25 #:use-module (guix tests) 25 #:use-module (guix tests)
26 #:use-module (guix scripts size) 26 #:use-module (guix scripts size)
27 #:use-module (gnu packages)
27 #:use-module (gnu packages bootstrap) 28 #:use-module (gnu packages bootstrap)
28 #:use-module (ice-9 match) 29 #:use-module (ice-9 match)
29 #:use-module (srfi srfi-1) 30 #:use-module (srfi srfi-1)
@@ -54,9 +55,15 @@
54 (built-derivations (list file2)) 55 (built-derivations (list file2))
55 (mlet %store-monad ((profiles (store-profile 56 (mlet %store-monad ((profiles (store-profile
56 (derivation->output-path file2))) 57 (derivation->output-path file2)))
58 (bash (interned-file
59 (search-bootstrap-binary
60 "bash" (%current-system)) "bash"
61 #:recursive? #t))
57 (guile (package->derivation %bootstrap-guile))) 62 (guile (package->derivation %bootstrap-guile)))
58 (define (lookup-profile drv) 63 (define (lookup-profile item)
59 (find (matching-profile (derivation->output-path drv)) 64 (find (matching-profile (if (derivation? item)
65 (derivation->output-path item)
66 item))
60 profiles)) 67 profiles))
61 68
62 (letrec-syntax ((match* (syntax-rules (=>) 69 (letrec-syntax ((match* (syntax-rules (=>)
@@ -67,15 +74,17 @@
67 ((_ () body) 74 ((_ () body)
68 body)))) 75 body))))
69 ;; Make sure we get all three profiles with sensible values. 76 ;; Make sure we get all three profiles with sensible values.
70 (return (and (= (length profiles) 3) 77 (return (and (= (length profiles) 4)
71 (match* ((file1 => profile1) 78 (match* ((file1 => profile1)
72 (file2 => profile2) 79 (file2 => profile2)
73 (guile => profile3)) 80 (guile => profile3)
81 (bash => profile4)) ;dependency of GUILE
74 (and (> (profile-closure-size profile2) 0) 82 (and (> (profile-closure-size profile2) 0)
75 (= (profile-closure-size profile2) 83 (= (profile-closure-size profile2)
76 (+ (profile-self-size profile1) 84 (+ (profile-self-size profile1)
77 (profile-self-size profile2) 85 (profile-self-size profile2)
78 (profile-self-size profile3)))))))))))) 86 (profile-self-size profile3)
87 (profile-self-size profile4))))))))))))
79 88
80(test-end "size") 89(test-end "size")
81 90