[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/08: tests: Create a copy-on-write image instead of copying eagerly.
From: |
Ludovic Courtès |
Subject: |
01/08: tests: Create a copy-on-write image instead of copying eagerly. |
Date: |
Wed, 30 Nov 2016 16:35:27 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit 130079ae27b47228516dc2934bcdecca5dbedf12
Author: Ludovic Courtès <address@hidden>
Date: Wed Nov 30 00:05:22 2016 +0100
tests: Create a copy-on-write image instead of copying eagerly.
* gnu/tests/install.scm (qemu-command/writable-image): Invoke 'qemu-img
-o backing_file' instead of calling 'copy-file'.
---
gnu/tests/install.scm | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index ecf1ac1..4779b80 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -199,8 +199,15 @@ 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.
- (format #t "copying image '~a'...~%" image)
- (copy-file image "disk.img")
+ (format #t "creating writable image from '~a'...~%" image)
+ (unless (zero? (system* #+(file-append qemu-minimal
+ "/bin/qemu-img")
+ "create" "-f" "qcow2"
+ "-o"
+ (string-append "backing_file=" image)
+ "disk.img"))
+ (error "failed to create writable QEMU image" image))
+
(chmod "disk.img" #o644)
`(,(string-append #$qemu-minimal "/bin/"
#$(qemu-command system))
- branch master updated (dcd9d16 -> 72f0c5e), Ludovic Courtès, 2016/11/30
- 06/08: refresh: '--list-updaters' shows updater coverage., Ludovic Courtès, 2016/11/30
- 08/08: gnu: iw: Update to 4.9., Ludovic Courtès, 2016/11/30
- 07/08: gnu: pciutils: Update to 3.5.2., Ludovic Courtès, 2016/11/30
- 01/08: tests: Create a copy-on-write image instead of copying eagerly.,
Ludovic Courtès <=
- 04/08: upstream: Properly verify signatures of uncompressed tarballs., Ludovic Courtès, 2016/11/30
- 05/08: gnu-maintenance: Add kernel.org updater., Ludovic Courtès, 2016/11/30
- 02/08: gnu-maintenance: Factorize URL prefix predicates., Ludovic Courtès, 2016/11/30
- 03/08: refresh: Honor the selected updaters when '-u' isn't given., Ludovic Courtès, 2016/11/30