GNU bug report logs -
#28288
[PATCH] Test and fix the ISO Image Installer
Previous Next
Reported by: Christopher Baines <mail <at> cbaines.net>
Date: Wed, 30 Aug 2017 06:18:02 UTC
Severity: important
Tags: patch
Done: Christopher Baines <mail <at> cbaines.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* gnu/tests/install.scm (%test-iso-image-installer): New variable.
(run-install): Add #:installation-disk-image-file-system-type as a keyword
argument.
---
gnu/tests/install.scm | 48 +++++++++++++++++++++++++++++++++++++-----------
1 file changed, 37 insertions(+), 11 deletions(-)
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index 866bf885c..7596347a3 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -37,6 +37,7 @@
#:use-module (guix utils)
#:export (%test-installed-os
%test-installed-extlinux-os
+ %test-iso-image-installer
%test-separate-store-os
%test-separate-home-os
%test-raid-root-os
@@ -196,6 +197,7 @@ reboot\n")
(kernel-arguments '("console=ttyS0")))
#:imported-modules '((gnu services herd)
(guix combinators))))
+ (installation-disk-image-file-system-type "ext4")
(target-size (* 1200 MiB)))
"Run SCRIPT (a shell script following the GuixSD installation procedure) in
OS to install TARGET-OS. Return a VM image of TARGET-SIZE bytes containing
@@ -213,7 +215,9 @@ packages defined in installation-os."
(image (system-disk-image
(operating-system-with-gc-roots
os (list target))
- #:disk-image-size (* 1500 MiB))))
+ #:disk-image-size (* 1500 MiB)
+ #:file-system-type
+ installation-disk-image-file-system-type)))
(define install
(with-imported-modules '((guix build utils)
(gnu build marionette))
@@ -229,16 +233,24 @@ packages defined in installation-os."
(define marionette
(make-marionette
- (cons (which #$(qemu-command system))
- (cons* "-no-reboot" "-m" "800"
- "-drive"
- (string-append "file=" #$image
- ",if=virtio,readonly")
- "-drive"
- (string-append "file=" #$output ",if=virtio")
- (if (file-exists? "/dev/kvm")
- '("-enable-kvm")
- '())))))
+ `(,(which #$(qemu-command system))
+ "-no-reboot"
+ "-m" "800"
+ ,@(case installation-disk-image-file-system-type
+ (("ext4")
+ `("-drive"
+ ,(string-append "file=" #$image
+ ",if=virtio,readonly")))
+ (("iso9660") '("-cdrom" #$image))
+ (else
+ (error
+ "unsupported installation-disk-image-file-system-type"
+ installation-disk-image-file-system-type)))
+ "-drive"
+ ,(string-append "file=" #$output ",if=virtio")
+ ,@(if (file-exists? "/dev/kvm")
+ '("-enable-kvm")
+ '()))))
(pk 'uname (marionette-eval '(uname) marionette))
@@ -312,6 +324,20 @@ per %test-installed-os, this test is expensive in terms of CPU and storage.")
(run-basic-test %minimal-extlinux-os command
"installed-extlinux-os")))))
+(define %test-iso-image-installer
+ (system-test
+ (name "iso-image-installer")
+ (description
+ "")
+ (value
+ (mlet* %store-monad ((image (run-install
+ %minimal-os
+ %minimal-os-source
+ #:installation-disk-image-file-system-type
+ "iso9660"))
+ (command (qemu-command/writable-image image)))
+ (run-basic-test %minimal-os command name)))))
+
;;;
;;; Separate /home.
--
2.14.1
This bug report was last modified 7 years and 259 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.