summaryrefslogtreecommitdiff
path: root/tests/packages.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/packages.scm')
-rw-r--r--tests/packages.scm38
1 files changed, 17 insertions, 21 deletions
diff --git a/tests/packages.scm b/tests/packages.scm
index 8619011f59..706739fb70 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -121,17 +121,16 @@
(package-source package))))
(string=? file source)))
-(test-assert "return values"
- (let-values (((drv-path drv)
- (package-derivation %store (dummy-package "p"))))
- (and (derivation-path? drv-path)
- (derivation? drv))))
+(test-assert "return value"
+ (let ((drv (package-derivation %store (dummy-package "p"))))
+ (and (derivation? drv)
+ (file-exists? (derivation-file-name drv)))))
(test-assert "package-output"
(let* ((package (dummy-package "p"))
- (drv-path (package-derivation %store package)))
- (and (derivation-path? drv-path)
- (string=? (derivation-path->output-path drv-path)
+ (drv (package-derivation %store package)))
+ (and (derivation? drv)
+ (string=? (derivation->output-path drv)
(package-output %store package "out")))))
(test-assert "trivial"
@@ -148,7 +147,7 @@
(display '(hello guix) p))))))))
(d (package-derivation %store p)))
(and (build-derivations %store (list d))
- (let ((p (pk 'drv d (derivation-path->output-path d))))
+ (let ((p (pk 'drv d (derivation->output-path d))))
(equal? '(hello guix)
(call-with-input-file (string-append p "/test") read))))))
@@ -164,7 +163,7 @@
(inputs `(("input" ,i)))))
(d (package-derivation %store p)))
(and (build-derivations %store (list d))
- (let ((p (pk 'drv d (derivation-path->output-path d))))
+ (let ((p (pk 'drv d (derivation->output-path d))))
(equal? (call-with-input-file p get-bytevector-all)
(call-with-input-file i get-bytevector-all))))))
@@ -183,7 +182,7 @@
(%current-system)))))))
(d (package-derivation %store p)))
(and (build-derivations %store (list d))
- (let ((p (pk 'drv d (derivation-path->output-path d))))
+ (let ((p (pk 'drv d (derivation->output-path d))))
(eq? 'hello (call-with-input-file p read))))))
(test-assert "search paths"
@@ -222,20 +221,17 @@
(equal? x (collect (package-derivation %store c)))))))
(test-assert "package-cross-derivation"
- (let-values (((drv-path drv)
- (package-cross-derivation %store (dummy-package "p")
- "mips64el-linux-gnu")))
- (and (derivation-path? drv-path)
- (derivation? drv))))
+ (let ((drv (package-cross-derivation %store (dummy-package "p")
+ "mips64el-linux-gnu")))
+ (and (derivation? drv)
+ (file-exists? (derivation-file-name drv)))))
(test-assert "package-cross-derivation, trivial-build-system"
(let ((p (package (inherit (dummy-package "p"))
(build-system trivial-build-system)
(arguments '(#:builder (exit 1))))))
- (let-values (((drv-path drv)
- (package-cross-derivation %store p "mips64el-linux-gnu")))
- (and (derivation-path? drv-path)
- (derivation? drv)))))
+ (let ((drv (package-cross-derivation %store p "mips64el-linux-gnu")))
+ (derivation? drv))))
(test-assert "package-cross-derivation, no cross builder"
(let* ((b (build-system (inherit trivial-build-system)
@@ -257,7 +253,7 @@
(or (location? (package-location gnu-make))
(not (package-location gnu-make)))
(let* ((drv (package-derivation %store gnu-make))
- (out (derivation-path->output-path drv)))
+ (out (derivation->output-path drv)))
(and (build-derivations %store (list drv))
(file-exists? (string-append out "/bin/make")))))))