aboutsummaryrefslogtreecommitdiff
path: root/tests/derivations.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/derivations.scm')
-rw-r--r--tests/derivations.scm19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/derivations.scm b/tests/derivations.scm
index 3fc7097a87..b6bd4dab0d 100644
--- a/tests/derivations.scm
+++ b/tests/derivations.scm
@@ -172,7 +172,16 @@
(and (valid-path? %store p)
(file-exists? (string-append p "/good")))))))
-(test-skip (if (%guile-for-build) 0 4))
+(test-skip (if (%guile-for-build) 0 6))
+
+(test-assert "build-expression->derivation and derivation-prerequisites"
+ (let-values (((drv-path drv)
+ (build-expression->derivation %store "fail" (%current-system)
+ #f '())))
+ (any (match-lambda
+ (($ <derivation-input> path)
+ (string=? path (%guile-for-build))))
+ (derivation-prerequisites drv))))
(test-assert "build-expression->derivation without inputs"
(let* ((builder '(begin
@@ -188,6 +197,14 @@
(equal? '(hello guix)
(call-with-input-file (string-append p "/test") read))))))
+(test-assert "build-expression->derivation and derivation-prerequisites-to-build"
+ (let-values (((drv-path drv)
+ (build-expression->derivation %store "fail" (%current-system)
+ #f '())))
+ ;; The only direct dependency is (%guile-for-build) and it's already
+ ;; built.
+ (null? (derivation-prerequisites-to-build %store drv))))
+
(test-assert "build-expression->derivation with expression returning #f"
(let* ((builder '(begin
(mkdir %output)