summaryrefslogtreecommitdiff
path: root/tests/store.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-06-13 13:24:35 +0200
committerLudovic Courtès <ludo@gnu.org>2019-06-13 13:24:35 +0200
commitd9bbfe042e06df35c12e4b8f53bfb1889cba90bf (patch)
tree9f34077cd824e8955be4ed2b5f1a459aa8076489 /tests/store.scm
parentf87a7cc60e058d2e07560d0d602747b567d9dce4 (diff)
parent47f2168b6fabb105565526b2a1243eeeb13008fe (diff)
downloadpatches-d9bbfe042e06df35c12e4b8f53bfb1889cba90bf.tar
patches-d9bbfe042e06df35c12e4b8f53bfb1889cba90bf.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/store.scm')
-rw-r--r--tests/store.scm20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/store.scm b/tests/store.scm
index df66feaebb..518750d26a 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -599,6 +599,26 @@
(valid-path? s o)
(equal? c (call-with-input-file o get-string-all)))))))
+(test-assert "substitute + build-things with specific output"
+ (with-store s
+ (let* ((c (random-text)) ;contents of the output
+ (d (build-expression->derivation
+ s "substitute-me" `(begin ,c (exit 1)) ;would fail
+ #:outputs '("out" "one" "two")
+ #:guile-for-build
+ (package-derivation s %bootstrap-guile (%current-system))))
+ (o (derivation->output-path d)))
+ (with-derivation-substitute d c
+ (set-build-options s #:use-substitutes? #t
+ #:substitute-urls (%test-substitute-urls))
+ (and (has-substitutes? s o)
+
+ ;; Ask for nothing but the "out" output of D.
+ (build-things s `((,(derivation-file-name d) . "out")))
+
+ (valid-path? s o)
+ (equal? c (call-with-input-file o get-string-all)))))))
+
(test-assert "substitute, corrupt output hash"
;; Tweak the substituter into installing a substitute whose hash doesn't
;; match the one announced in the narinfo. The daemon must notice this and