me
/
guix
Archived
1
0
Fork 0

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.
master
Ludovic Courtès 2016-10-27 11:21:28 +02:00
parent 4ed2f515d6
commit b800b8da21
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 3 additions and 3 deletions

View File

@ -191,9 +191,9 @@ the installed system."
(gexp->derivation "installation" install))) (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 "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))) (mlet %store-monad ((system (current-system)))
(return #~(let ((image #$image)) (return #~(let ((image #$image))
;; First we need a writable copy of the image. ;; First we need a writable copy of the image.
@ -205,7 +205,7 @@ IMAGE, a disk image."
,@(if (file-exists? "/dev/kvm") ,@(if (file-exists? "/dev/kvm")
'("-enable-kvm") '("-enable-kvm")
'()) '())
"-no-reboot" "-m" "256" "-no-reboot" "-m" #$(number->string memory-size)
"-drive" "file=disk.img,if=virtio"))))) "-drive" "file=disk.img,if=virtio")))))