aboutsummaryrefslogtreecommitdiff
path: root/tests/derivations.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-07-13 15:46:12 +0200
committerLudovic Courtès <ludo@gnu.org>2015-07-13 18:29:01 +0200
commit24f5aaaf24e009de7f7402f2d311a26cafbf4f4a (patch)
tree117c62b4767426211474aadfde6f5c10bf90221d /tests/derivations.scm
parent895d1eda547708dd46074a2dd2f934de275fb102 (diff)
downloadpatches-24f5aaaf24e009de7f7402f2d311a26cafbf4f4a.tar
patches-24f5aaaf24e009de7f7402f2d311a26cafbf4f4a.tar.gz
substitute: Honor "substitute-urls" option passed by "untrusted" clients.
* guix/scripts/substitute.scm (or*): New macro. (%cache-url): Honor "untrusted-substitute-urls". * guix/tests.scm (%test-substitute-urls): New variable. (open-connection-for-tests): Use it. * tests/derivations.scm ("derivation-prerequisites-to-build and substitutes", "derivation-prerequisites-to-build and substitutes, non-substitutable build", "derivation-prerequisites-to-build and substitutes, local build"): Pass it to 'set-build-options'. * tests/guix-daemon.sh: Likewise. * tests/store.scm ("substitute query, alternating URLs"): New test. ("substitute query", "substitute", "substitute + build-things with output path", "substitute, corrupt output hash", "substitute --fallback"): Pass #:substitute-urls to 'set-build-options'.
Diffstat (limited to 'tests/derivations.scm')
-rw-r--r--tests/derivations.scm9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/derivations.scm b/tests/derivations.scm
index f66ef5cdd7..d2a090c8bc 100644
--- a/tests/derivations.scm
+++ b/tests/derivations.scm
@@ -612,7 +612,8 @@
(output (derivation->output-path drv)))
;; Make sure substitutes are usable.
- (set-build-options store #:use-substitutes? #t)
+ (set-build-options store #:use-substitutes? #t
+ #:substitute-urls (%test-substitute-urls))
(with-derivation-narinfo drv
(let-values (((build download)
@@ -634,7 +635,8 @@
(output (derivation->output-path drv)))
;; Make sure substitutes are usable.
- (set-build-options store #:use-substitutes? #t)
+ (set-build-options store #:use-substitutes? #t
+ #:substitute-urls (%test-substitute-urls))
(with-derivation-narinfo drv
(let-values (((build download)
@@ -655,7 +657,8 @@
(output (derivation->output-path drv)))
;; Make sure substitutes are usable.
- (set-build-options store #:use-substitutes? #t)
+ (set-build-options store #:use-substitutes? #t
+ #:substitute-urls (%test-substitute-urls))
(with-derivation-narinfo drv
(let-values (((build download)