diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-06-07 11:54:03 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-06-07 11:54:03 +0200 |
commit | aeafff536f933b07836b14d089dfc52b0e432ec9 (patch) | |
tree | 4ede554999f98cf9e19c04098c934db52efae795 /tests/store.scm | |
parent | 9dee9e8ffe4650949bd3ad2edf559cf4a33e9e6e (diff) | |
parent | f82c58539e1f7b9b864e68ea2ab0c6a17c15fbb5 (diff) | |
download | guix-aeafff536f933b07836b14d089dfc52b0e432ec9.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/store.scm')
-rw-r--r-- | tests/store.scm | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/tests/store.scm b/tests/store.scm index eeadcb94f8..38b8efce96 100644 --- a/tests/store.scm +++ b/tests/store.scm @@ -205,7 +205,8 @@ (%current-system)))) (d (derivation s "the-thing" b '("--help") #:inputs `((,b))))) - (references/substitutes s (list (derivation->output-path d) b)))))) + (references/substitutes s (list (derivation->output-path d) b)) + #f)))) (test-assert "references/substitutes with substitute info" (with-store s @@ -231,6 +232,32 @@ (,t1) ;refs of T2 ())))))) ;refs of T1 +(test-equal "substitutable-path-info when substitutes are turned off" + '() + (with-store s + (set-build-options s #:use-substitutes? #f) + (let* ((b (add-to-store s "bash" #t "sha256" + (search-bootstrap-binary "bash" + (%current-system)))) + (d (derivation s "the-thing" b '("--version") + #:inputs `((,b)))) + (o (derivation->output-path d))) + (with-derivation-narinfo d + (substitutable-path-info s (list o)))))) + +(test-equal "substitutable-paths when substitutes are turned off" + '() + (with-store s + (set-build-options s #:use-substitutes? #f) + (let* ((b (add-to-store s "bash" #t "sha256" + (search-bootstrap-binary "bash" + (%current-system)))) + (d (derivation s "the-thing" b '("--version") + #:inputs `((,b)))) + (o (derivation->output-path d))) + (with-derivation-narinfo d + (substitutable-paths s (list o)))))) + (test-assert "requisites" (let* ((t1 (add-text-to-store %store "random1" (random-text) '())) @@ -244,10 +271,12 @@ (and (= (length x) (length y)) (lset= equal? x y))) - (and (same? (requisites %store t1) (list t1)) - (same? (requisites %store t2) (list t1 t2)) - (same? (requisites %store t3) (list t1 t2 t3)) - (same? (requisites %store t4) (list t1 t2 t3 t4))))) + (and (same? (requisites %store (list t1)) (list t1)) + (same? (requisites %store (list t2)) (list t1 t2)) + (same? (requisites %store (list t3)) (list t1 t2 t3)) + (same? (requisites %store (list t4)) (list t1 t2 t3 t4)) + (same? (requisites %store (list t1 t2 t3 t4)) + (list t1 t2 t3 t4))))) (test-assert "derivers" (let* ((b (add-text-to-store %store "build" "echo $foo > $out" '())) |