summaryrefslogtreecommitdiff
path: root/tests/gexp.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gexp.scm')
-rw-r--r--tests/gexp.scm30
1 files changed, 24 insertions, 6 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm
index c80ca13fab..07e940ffdc 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -502,7 +502,7 @@
(ungexp coreutils)
(ungexp-native glibc)
(ungexp binutils))))
- (target "mips64el-linux")
+ (target "mips64el-linux-gnu")
(guile (derivation->output-path
(package-derivation %store %bootstrap-guile)))
(cu (derivation->output-path
@@ -547,7 +547,7 @@
(gexp->sexp* exp)))))
(test-assert "input list + ungexp-native"
- (let* ((target "mips64el-linux")
+ (let* ((target "mips64el-linux-gnu")
(exp (gexp (display
(cons '(ungexp-native (list %bootstrap-guile coreutils))
'(ungexp (list glibc binutils))))))
@@ -764,7 +764,7 @@
intd)))))
(test-assertm "gexp->derivation, cross-compilation"
- (mlet* %store-monad ((target -> "mips64el-linux")
+ (mlet* %store-monad ((target -> "mips64el-linux-gnu")
(exp -> (gexp (list (ungexp coreutils)
(ungexp output))))
(xdrv (gexp->derivation "foo" exp
@@ -778,7 +778,7 @@
(not (member (derivation-file-name cu) refs))))))
(test-assertm "gexp->derivation, ungexp-native"
- (mlet* %store-monad ((target -> "mips64el-linux")
+ (mlet* %store-monad ((target -> "mips64el-linux-gnu")
(exp -> (gexp (list (ungexp-native coreutils)
(ungexp output))))
(xdrv (gexp->derivation "foo" exp
@@ -788,7 +788,7 @@
(derivation-file-name xdrv)))))
(test-assertm "gexp->derivation, ungexp + ungexp-native"
- (mlet* %store-monad ((target -> "mips64el-linux")
+ (mlet* %store-monad ((target -> "mips64el-linux-gnu")
(exp -> (gexp (list (ungexp-native coreutils)
(ungexp glibc)
(ungexp output))))
@@ -802,7 +802,7 @@
(member (derivation-file-name xglibc) refs)))))
(test-assertm "gexp->derivation, ungexp-native + composed gexps"
- (mlet* %store-monad ((target -> "mips64el-linux")
+ (mlet* %store-monad ((target -> "mips64el-linux-gnu")
(exp0 -> (gexp (list 1 2
(ungexp coreutils))))
(exp -> (gexp (list 0 (ungexp-native exp0))))
@@ -1606,6 +1606,24 @@ importing.* \\(guix config\\) from the host"
(not (member (derivation-file-name native) refs))
(member (derivation-file-name cross) refs))))))
+(test-assertm "references-file"
+ (let* ((exp #~(symlink #$%bootstrap-guile #$output))
+ (computed (computed-file "computed" exp
+ #:guile %bootstrap-guile))
+ (refs (references-file computed "refs"
+ #:guile %bootstrap-guile)))
+ (mlet* %store-monad ((drv0 (lower-object %bootstrap-guile))
+ (drv1 (lower-object computed))
+ (drv2 (lower-object refs)))
+ (mbegin %store-monad
+ (built-derivations (list drv2))
+ (mlet %store-monad ((refs ((store-lift requisites)
+ (list (derivation->output-path drv1)))))
+ (return (lset= string=?
+ (call-with-input-file (derivation->output-path drv2)
+ read)
+ refs)))))))
+
(test-assert "lower-object & gexp-input-error?"
(guard (c ((gexp-input-error? c)
(gexp-error-invalid-input c)))