From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLYPF-0002Kb-Ub for guix-patches@gnu.org; Thu, 15 Jun 2017 13:18:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLYPC-00061b-LX for guix-patches@gnu.org; Thu, 15 Jun 2017 13:18:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:47190) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dLYPC-00061P-Ho for guix-patches@gnu.org; Thu, 15 Jun 2017 13:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dLYPC-0004sd-Cm for guix-patches@gnu.org; Thu, 15 Jun 2017 13:18:02 -0400 Subject: [bug#27387] [PATCH] tests: Allow setting of qemu memory-size for system tests. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLYOH-0002I0-FW for guix-patches@gnu.org; Thu, 15 Jun 2017 13:17:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLYOE-0005rr-2g for guix-patches@gnu.org; Thu, 15 Jun 2017 13:17:05 -0400 From: Jan Nieuwenhuizen Date: Thu, 15 Jun 2017 19:16:54 +0200 Message-Id: <20170615171654.2199-1-janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27387@debbugs.gnu.org * gnu/system/vm.scm (common-qemu-options): Remove hardcoded "-m 256". (system-qemu-image/shared-store-script): New keyword argument: #:memory-size. Default to 256 (MiB). --- gnu/system/vm.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index ad5e6b75b..392737d07 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -489,20 +489,21 @@ with '-virtfs' options for the host file systems listed in SHARED-FS." #$@(map virtfs-option shared-fs) "-vga std" (format #f "-drive file=~a,if=virtio,cache=writeback,werror=report,readonly" - #$image) - "-m 256")) + #$image))) (define* (system-qemu-image/shared-store-script os #:key (qemu qemu) (graphic? #t) + (memory-size 256) (mappings '()) full-boot? (disk-image-size (* (if full-boot? 500 70) (expt 2 20)))) "Return a derivation that builds a script to run a virtual machine image of -OS that shares its store with the host. +OS that shares its store with the host. The virtual machine runs with +MEMORY-SIZE MiB of memory. MAPPINGS is a list of specifying mapping of host file systems into the guest. @@ -531,7 +532,8 @@ it is mostly useful when FULL-BOOT? is true." (string-join #$kernel-arguments " ")))) #$@(common-qemu-options image (map file-system-mapping-source - (cons %store-mapping mappings))))) + (cons %store-mapping mappings))) + "-m " (number->string #$memory-size))) (define builder #~(call-with-output-file #$output -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com