diff options
author | 宋文武 <iyzsong@gmail.com> | 2015-05-23 09:43:12 +0800 |
---|---|---|
committer | 宋文武 <iyzsong@gmail.com> | 2015-05-23 09:43:12 +0800 |
commit | 86a81222cad9841c67e9d9bcd46c567383e9a34f (patch) | |
tree | d976896cba87c5de65d8fdc4bf0be85880c04153 /tests/store.scm | |
parent | 3e3d47fc5347a5032fd2039831be1dc1d80576ed (diff) | |
parent | 8605321dd6f3c42590046be9d69112a8c8cf7cbf (diff) | |
download | guix-86a81222cad9841c67e9d9bcd46c567383e9a34f.tar guix-86a81222cad9841c67e9d9bcd46c567383e9a34f.tar.gz |
Merge branch 'master' into gtk-rebuild
Conflicts:
gnu/packages/gtk.scm
Diffstat (limited to 'tests/store.scm')
-rw-r--r-- | tests/store.scm | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/store.scm b/tests/store.scm index 9ed78be085..eeceed45c1 100644 --- a/tests/store.scm +++ b/tests/store.scm @@ -367,15 +367,15 @@ (with-store s (let* ((d (package-derivation s %bootstrap-guile (%current-system))) (o (derivation->output-path d))) - ;; Create fake substituter data, to be read by `substitute-binary'. + ;; Create fake substituter data, to be read by 'guix substitute'. (with-derivation-narinfo d ;; Remove entry from the local cache. (false-if-exception (delete-file (string-append (getenv "XDG_CACHE_HOME") - "/guix/substitute-binary/" + "/guix/substitute/" (store-path-hash-part o)))) - ;; Make sure `substitute-binary' correctly communicates the above + ;; Make sure 'guix substitute' correctly communicates the above ;; data. (set-build-options s #:use-substitutes? #t) (and (has-substitutes? s o) @@ -439,7 +439,7 @@ (with-derivation-substitute d c (sha256 => (make-bytevector 32 0)) ;select a hash that doesn't match C - ;; Make sure we use `substitute-binary'. + ;; Make sure we use 'guix substitute'. (set-build-options s #:use-substitutes? #t #:fallback? #f) @@ -464,9 +464,9 @@ #:guile-for-build (package-derivation s %bootstrap-guile (%current-system)))) (o (derivation->output-path d))) - ;; Create fake substituter data, to be read by `substitute-binary'. + ;; Create fake substituter data, to be read by 'guix substitute'. (with-derivation-narinfo d - ;; Make sure we use `substitute-binary'. + ;; Make sure we use 'guix substitute'. (set-build-options s #:use-substitutes? #t) (and (has-substitutes? s o) (guard (c ((nix-protocol-error? c) @@ -606,6 +606,16 @@ (file (add %store "foo" "Lowered."))) (call-with-input-file file get-string-all))) +(test-assert "query-path-info" + (let* ((ref (add-text-to-store %store "ref" "foo")) + (item (add-text-to-store %store "item" "bar" (list ref))) + (info (query-path-info %store item))) + (and (equal? (path-info-references info) (list ref)) + (equal? (path-info-hash info) + (sha256 + (string->utf8 + (call-with-output-string (cut write-file item <>)))))))) + (test-end "store") |