aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-10-27 11:21:28 +0200
committerLudovic Courtès <ludo@gnu.org>2016-10-27 13:48:52 +0200
commitb800b8da2123fb6877c706a06e531b7266aee507 (patch)
treea1cc80f0287e6b3eedfdf5b370a659758c1f8d99
parent4ed2f515d69a199154c272997f4683b89ac0a9b8 (diff)
downloadguix-b800b8da2123fb6877c706a06e531b7266aee507.tar
guix-b800b8da2123fb6877c706a06e531b7266aee507.tar.gz
tests: Add #:memory-size parameter for the command to run the installed OS.
* gnu/tests/install.scm (qemu-command/writable-image): Add #:memory-size parameter and honor it.
-rw-r--r--gnu/tests/install.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index 0f54935ea8..b3908ec7b2 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -191,9 +191,9 @@ the installed system."
(gexp->derivation "installation" install)))
-(define (qemu-command/writable-image image)
+(define* (qemu-command/writable-image image #:key (memory-size 256))
"Return as a monadic value the command to run QEMU on a writable copy of
-IMAGE, a disk image."
+IMAGE, a disk image. The QEMU VM is has access to MEMORY-SIZE MiB of RAM."
(mlet %store-monad ((system (current-system)))
(return #~(let ((image #$image))
;; First we need a writable copy of the image.
@@ -205,7 +205,7 @@ IMAGE, a disk image."
,@(if (file-exists? "/dev/kvm")
'("-enable-kvm")
'())
- "-no-reboot" "-m" "256"
+ "-no-reboot" "-m" #$(number->string memory-size)
"-drive" "file=disk.img,if=virtio")))))