aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-11-12 00:10:10 +0100
committerLudovic Courtès <ludo@gnu.org>2013-11-12 01:06:45 +0100
commiteddd4077a5292052d95443078ee4db9f34f2f0e2 (patch)
treed157119a2613b08fa3947e9c756c99f1086a557b /tests
parent08184ebf16fad0e84c3dc22b059cd0e211684954 (diff)
downloadguix-eddd4077a5292052d95443078ee4db9f34f2f0e2.tar
guix-eddd4077a5292052d95443078ee4db9f34f2f0e2.tar.gz
store: Add 'log-file' procedure.
* guix/store.scm (log-file): New procedure. * tests/store.scm ("log-file, derivation", "log-file, output file name"): New tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/store.scm27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/store.scm b/tests/store.scm
index b5e0cb0eab..430027c33b 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -140,6 +140,33 @@
(equal? (valid-derivers %store o)
(list (derivation-file-name d))))))
+(test-assert "log-file, derivation"
+ (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"
+ s `("-e" ,b)
+ #:env-vars `(("foo" . ,(random-text)))
+ #:inputs `((,b) (,s)))))
+ (and (build-derivations %store (list d))
+ (file-exists? (pk (log-file %store (derivation-file-name d)))))))
+
+(test-assert "log-file, output file name"
+ (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"
+ s `("-e" ,b)
+ #:env-vars `(("foo" . ,(random-text)))
+ #:inputs `((,b) (,s))))
+ (o (derivation->output-path d)))
+ (and (build-derivations %store (list d))
+ (file-exists? (pk (log-file %store o)))
+ (string=? (log-file %store (derivation-file-name d))
+ (log-file %store o)))))
+
(test-assert "no substitutes"
(let* ((s (open-connection))
(d1 (package-derivation s %bootstrap-guile (%current-system)))