diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-06-11 10:27:09 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-06-11 10:27:09 +0200 |
commit | 58bf51b4c0771fb6cfcf22be84d734096e7b11e0 (patch) | |
tree | 69c22625468b10e43fd37e7c5ddc420a1de6ab55 /tests/store.scm | |
parent | 69ecd666d73ebc5ee7a0be54f4e24f000d1d7e31 (diff) | |
parent | bf3005346e6538aba6d077c887f688779b94b274 (diff) | |
download | patches-58bf51b4c0771fb6cfcf22be84d734096e7b11e0.tar patches-58bf51b4c0771fb6cfcf22be84d734096e7b11e0.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'tests/store.scm')
-rw-r--r-- | tests/store.scm | 20 |
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 |