summary refs log tree commit diff
path: root/gnu/tests/install.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/tests/install.scm')
-rw-r--r--gnu/tests/install.scm65
1 files changed, 61 insertions, 4 deletions
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index ae54154c5c..b104efcfd5 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -35,6 +35,7 @@
   #:use-module (guix utils)
   #:export (%test-installed-os
             %test-separate-store-os
+            %test-separate-home-os
             %test-raid-root-os
             %test-encrypted-os
             %test-btrfs-root-os))
@@ -218,7 +219,6 @@ IMAGE, a disk image.  The QEMU VM is has access to MEMORY-SIZE MiB of RAM."
                   "-no-reboot" "-m" #$(number->string memory-size)
                   "-drive" "file=disk.img,if=virtio")))))
 
-
 (define %test-installed-os
   (system-test
    (name "installed-os")
@@ -234,6 +234,64 @@ build (current-guix) and then store a couple of full system images.")
 
 
 ;;;
+;;; Separate /home.
+;;;
+
+(define-os-with-source (%separate-home-os %separate-home-os-source)
+  ;; The OS we want to install.
+  (use-modules (gnu) (gnu tests) (srfi srfi-1))
+
+  (operating-system
+    (host-name "liberigilo")
+    (timezone "Europe/Paris")
+    (locale "en_US.utf8")
+
+    (bootloader (grub-configuration (device "/dev/vdb")))
+    (kernel-arguments '("console=ttyS0"))
+    (file-systems (cons* (file-system
+                           (device "my-root")
+                           (title 'label)
+                           (mount-point "/")
+                           (type "ext4"))
+                         (file-system
+                           (device "none")
+                           (title 'device)
+                           (type "tmpfs")
+                           (mount-point "/home")
+                           (type "tmpfs"))
+                         %base-file-systems))
+    (users (cons* (user-account
+                   (name "alice")
+                   (group "users")
+                   (home-directory "/home/alice"))
+                  (user-account
+                   (name "charlie")
+                   (group "users")
+                   (home-directory "/home/charlie"))
+                  %base-user-accounts))
+    (services (cons (service marionette-service-type
+                             (marionette-configuration
+                              (imported-modules '((gnu services herd)
+                                                  (guix combinators)))))
+                    %base-services))))
+
+(define %test-separate-home-os
+  (system-test
+   (name "separate-home-os")
+   (description
+    "Test basic functionality of an installed OS with a separate /home
+partition.  In particular, home directories must be correctly created (see
+<https://bugs.gnu.org/21108>).")
+   (value
+    (mlet* %store-monad ((image   (run-install %separate-home-os
+                                               %separate-home-os-source
+                                               #:script
+                                               %simple-installation-script))
+                         (command (qemu-command/writable-image image)))
+      (run-basic-test %separate-home-os command "separate-home-os")))))
+
+
+;;;
 ;;; Separate /gnu/store partition.
 ;;;
 
@@ -257,8 +315,7 @@ build (current-guix) and then store a couple of full system images.")
                            (device "store-fs")
                            (title 'label)
                            (mount-point "/gnu")
-                           (type "ext4")
-                           (needed-for-boot? #t)) ;definitely!
+                           (type "ext4"))
                          %base-file-systems))
     (users %base-user-accounts)
     (services (cons (service marionette-service-type