diff options
author | Marius Bakke <mbakke@fastmail.com> | 2017-03-30 22:59:53 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2017-03-30 22:59:53 +0200 |
commit | 84157bb8bf2c610584e0836047da4c710f8eaf76 (patch) | |
tree | be5d8c7238e32802221db55a3ee83e7f6a58affb /tests | |
parent | fa63939acba69e11df44073a7eb687bd2ba48349 (diff) | |
parent | 03d0aa8b22223b67ec9bbd363c4d5800efdbaf82 (diff) |
Merge branch 'master' into core-updates
Most conflicts are from 6fd52309b8f52c9bb59fccffac53e029ce94b698.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/derivations.scm | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/derivations.scm b/tests/derivations.scm index 3fbfec3793..75c8d1dfb1 100644 --- a/tests/derivations.scm +++ b/tests/derivations.scm @@ -888,6 +888,35 @@ (string=? (derivation-input-path input) (derivation-file-name dep)))))))) +(test-assert "substitution-oracle and #:substitute? #f" + (with-store store + (let* ((dep (build-expression->derivation store "dep" + `(begin ,(random-text) + (mkdir %output)))) + (drv (build-expression->derivation store "not-subst" + `(begin ,(random-text) + (mkdir %output)) + #:substitutable? #f + #:inputs `(("dep" ,dep)))) + (query #f)) + (define (record-substitutable-path-query store paths) + (when query + (error "already called!" query)) + (set! query paths) + '()) + + (mock ((guix store) substitutable-paths + record-substitutable-path-query) + + (let ((pred (substitution-oracle store (list drv)))) + (pred (derivation->output-path drv)))) + + ;; Make sure the oracle didn't try to get substitute info for DRV since + ;; DRV is mark as non-substitutable. Assume that GUILE-FOR-BUILD is + ;; already in store and thus not part of QUERY. + (equal? (pk 'query query) + (list (derivation->output-path dep)))))) + (test-assert "build-expression->derivation with expression returning #f" (let* ((builder '(begin (mkdir %output) |