summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-09-18 15:11:40 +0200
committerLudovic Courtès <ludo@gnu.org>2019-09-18 23:08:28 +0200
commit96b35998e610c7fc37bf87bf9e07e63d3bebd0a3 (patch)
treefb1b2a5796de007812415e7104ae326451e057ca /tests
parentf9c0400392843540a87985a67ffb9fb6e4dbc2fa (diff)
linux-container: 'eval/container' correctly passes -L and -C flags.
This fixes a type error. * gnu/system/linux-container.scm (eval/container): Use 'append-map', not 'map'. * tests/containers.scm ("eval/container, non-empty load path"): New test.
Diffstat (limited to 'tests')
-rw-r--r--tests/containers.scm27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/containers.scm b/tests/containers.scm
index c6c738f234..01fbcbb45a 100644
--- a/tests/containers.scm
+++ b/tests/containers.scm
@@ -269,4 +269,31 @@
(lset= string=? (cons* "." ".." (map basename reqs))
(pk (call-with-input-file result read))))))))))
+(test-assert "eval/container, non-empty load path"
+ (call-with-temporary-directory
+ (lambda (directory)
+ (define store
+ (open-connection-for-tests))
+ (define result
+ (string-append directory "/r"))
+ (define requisites*
+ (store-lift requisites))
+
+ (mkdir result)
+ (run-with-store store
+ (mlet %store-monad ((status (eval/container
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+ (mkdir-p "/result/a/b/c")))
+ #:mappings
+ (list (file-system-mapping
+ (source result)
+ (target "/result")
+ (writable? #t))))))
+ (close-connection store)
+ (return (and (zero? status)
+ (file-is-directory?
+ (string-append result "/a/b/c")))))))))
+
(test-end)