diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-03-04 23:27:24 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-03-04 23:27:24 +0100 |
commit | 81eec00cb221231123b74d14245ef7caa9d89ff6 (patch) | |
tree | 3beeb77c5535038dc75db843dd88a1775fb541bb /tests/store.scm | |
parent | 8689a1908a8353b80ed1fcbb81feddc5eb799f24 (diff) | |
parent | 2a1e82bb5c2ae28b0018aa765cff6733136b3f70 (diff) | |
download | guix-81eec00cb221231123b74d14245ef7caa9d89ff6.tar.gz |
Merge branch 'master' into core-updates
Conflicts: Makefile.am guix/scripts/gc.scm guix/scripts/package.scm guix/ui.scm tests/guix-package.sh
Diffstat (limited to 'tests/store.scm')
-rw-r--r-- | tests/store.scm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/store.scm b/tests/store.scm index c90fd3fed9..c2de99e160 100644 --- a/tests/store.scm +++ b/tests/store.scm @@ -23,6 +23,7 @@ #:use-module (guix base32) #:use-module (guix packages) #:use-module (guix derivations) + #:use-module (gnu packages) #:use-module (gnu packages bootstrap) #:use-module (ice-9 match) #:use-module (srfi srfi-1) @@ -79,6 +80,31 @@ (> freed 0) (not (file-exists? p)))))) +(test-assert "references" + (let* ((t1 (add-text-to-store %store "random1" + (random-text) '())) + (t2 (add-text-to-store %store "random2" + (random-text) (list t1)))) + (and (equal? (list t1) (references %store t2)) + (equal? (list t2) (referrers %store t1)) + (null? (references %store t1)) + (null? (referrers %store t2))))) + +(test-assert "derivers" + (let* ((b (add-text-to-store %store "build" "echo $foo > $out" '())) + (s (add-to-store %store "bash" #t "sha256" + (search-bootstrap-binary "bash" + (%current-system)))) + (d (derivation %store "the-thing" (%current-system) + s `("-e" ,b) `(("foo" . ,(random-text))) + `((,b) (,s)))) + (o (derivation-path->output-path d))) + (and (build-derivations %store (list d)) + (equal? (query-derivation-outputs %store d) + (list o)) + (equal? (valid-derivers %store o) + (list d))))) + (test-assert "no substitutes" (let* ((s (open-connection)) (d1 (package-derivation s %bootstrap-guile (%current-system))) |