summary refs log tree commit diff
path: root/tests/derivations.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-06-20 23:38:56 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-06-20 23:38:56 +0200
commit6cb1ef9ea28ee14b3bb5442e8af1f54c27802f09 (patch)
treec2c35f733d250f86eb052d174fcb1c24a54fea79 /tests/derivations.scm
parent20e4ee1e3b7044d9f64de02c6237b00e5a57da35 (diff)
parent010689e7067df1288af29176f4a8639de816b1ef (diff)
downloadguix-6cb1ef9ea28ee14b3bb5442e8af1f54c27802f09.tar.gz
Merge branch 'staging' into core-updates
Diffstat (limited to 'tests/derivations.scm')
-rw-r--r--tests/derivations.scm15
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/derivations.scm b/tests/derivations.scm
index 25ba4c9fa0..b0175d9fc5 100644
--- a/tests/derivations.scm
+++ b/tests/derivations.scm
@@ -815,20 +815,17 @@
     (null? (derivation-prerequisites-to-build %store drv))))
 
 (test-assert "derivation-prerequisites-to-build when outputs already present"
-  (let* ((builder    '(begin (mkdir %output) #t))
+  (let* ((builder    `(begin ,(random-text) (mkdir %output) #t))
          (input-drv  (build-expression->derivation %store "input" builder))
-         (input-path (derivation-output-path
-                      (assoc-ref (derivation-outputs input-drv)
-                                 "out")))
+         (input-path (derivation->output-path input-drv))
          (drv        (build-expression->derivation %store "something" builder
                                                    #:inputs
                                                    `(("i" ,input-drv))))
          (output     (derivation->output-path drv)))
-    ;; Make sure these things are not already built.
-    (when (valid-path? %store input-path)
-      (delete-paths %store (list input-path)))
-    (when (valid-path? %store output)
-      (delete-paths %store (list output)))
+    ;; Assume these things are not already built.
+    (when (or (valid-path? %store input-path)
+              (valid-path? %store output))
+      (error "things already built" input-drv))
 
     (and (equal? (map derivation-input-path
                       (derivation-prerequisites-to-build %store drv))