aboutsummaryrefslogtreecommitdiff
path: root/tests/store.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-02-03 23:24:25 +0100
committerLudovic Courtès <ludo@gnu.org>2013-02-04 08:58:48 +0100
commit0f3d2504f75595a2db2a2344b624ced2ba307448 (patch)
treee2fabb0313fa177717090e5b44818af2817e2d57 /tests/store.scm
parent63193ebfdc72eb11cfb1c50b8cd5dfc49d01361d (diff)
downloadpatches-0f3d2504f75595a2db2a2344b624ced2ba307448.tar
patches-0f3d2504f75595a2db2a2344b624ced2ba307448.tar.gz
store: Add substitute-related procedures.
* guix/store.scm (has-substitutes?, substitutable-paths, read-substitutable-path-list, substitutable-path-info): New procedures. (<substitutable>): New record type. (read-arg): Add `substitutable-path-info'. Change `hash' pattern variable to `base16' literal. * tests/store.scm ("no substitutes"): New test.
Diffstat (limited to 'tests/store.scm')
-rw-r--r--tests/store.scm15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/store.scm b/tests/store.scm
index 1ff6aa05c2..c90fd3fed9 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,6 +21,8 @@
#:use-module (guix store)
#:use-module (guix utils)
#:use-module (guix base32)
+ #:use-module (guix packages)
+ #:use-module (guix derivations)
#:use-module (gnu packages bootstrap)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1)
@@ -77,6 +79,17 @@
(> freed 0)
(not (file-exists? p))))))
+(test-assert "no substitutes"
+ (let* ((s (open-connection))
+ (d1 (package-derivation s %bootstrap-guile (%current-system)))
+ (d2 (package-derivation s %bootstrap-glibc (%current-system)))
+ (o (map derivation-path->output-path (list d1 d2))))
+ (set-build-options s #:use-substitutes? #f)
+ (and (not (has-substitutes? s d1))
+ (not (has-substitutes? s d2))
+ (null? (substitutable-paths s o))
+ (null? (substitutable-path-info s o)))))
+
(test-end "store")