Commit Graph

46 Commits

Author SHA1 Message Date
Ludovic Courtès
a860eddbbd
tests: Run guided installation tests from an ISO image.
* gnu/tests/install.scm (guided-installation-test): Pass
 #:installation-disk-image-file-system-type to 'run-install'.
2020-04-10 16:02:52 +02:00
Ludovic Courtès
9cfd889f1d
tests: Mark VM images as non-substitutable.
* gnu/tests/install.scm (run-install): Pass #:substitutable? to
'system-disk-image' and to 'gexp->derivation'.
2020-04-08 12:42:41 +02:00
Mathieu Othacehe
b03ebdbc7c
tests: install: Add %test-gui-installed-desktop-os-encrypted.
* gnu/tests/install.scm (gui-test-program): Add a desktop? argument, and pass it to choose-services,
(installation-target-os-for-gui-tests): new procedure,
(installation-target-desktop-os-for-gui-tests): new procedure,
(guided-installation-test): add target-os and desktop? arguments. Use
target-os instead of the previous os variable. Pass desktop? argument to
gui-test-program.
(%test-gui-installed-os): Adapt accordingly,
(%test-gui-installed-os-encrypted): ditto,
(%test-gui-installed-desktop-os-encrypted): new exported variable.
2020-03-26 11:53:50 +01:00
Mathieu Othacehe
1550db6fd4
tests: install: Abort when one installation step fails.
When marionette-eval calls fail in gui-test-program, the installation
continues which results in two scenarios:

- hang forever at the next marionette-eval call,

- keep going and start a broken installation, which is annoying because it
clears the terminal and hides the error.

Make sure that gui-test-program is exited with #f return code when one of the
marionette-eval calls fail.

* gnu/tests/install.scm (gui-test-program): Add a new macro
"marionette-eval*". Throw an exception when one on the marionette-eval calls
fail.
2020-03-22 10:53:55 +01:00
Ludovic Courtès
be0a672c30
tests: Accept manual installation scripts that exit with SIGTERM.
Fixes <https://bugs.gnu.org/39926>.
Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>.

Previously we'd error out if the installation script exits with
non-zero, which was the case because the 'reboot' program would
typically not get a reply, and thus would eventually be killed by PID 1
as the system is brought down.

* gnu/tests/install.scm (run-install)[install]: Expect SCRIPT to exit
with SIGTERM in addition to exiting with zero.
2020-03-19 23:17:32 +01:00
Mathieu Othacehe
e666a92344
tests: install: Add %test-gui-installed-os-encrypted.
* gnu/tests/install.scm (%test-gui-installed-os-encrypted): New variable,
(guided-installation-test): set a swap-device only if there is no encryption.
2020-03-05 23:40:24 +01:00
Ludovic Courtès
ccb1a8c437
tests: install: Add "gui-installed-os".
* gnu/installer/tests.scm: New file.
* gnu/local.mk (INSTALLER_MODULES): Add it.
* gnu/tests/install.scm (run-install): Add #:gui-test.  Add (gnu
installer tests) to the marionette imported modules.  Honor GUI-TEST.
Check whether SCRIPT is true.
(%root-password, %syslog-conf): New variable.
(operating-system-with-console-syslog, gui-test-program)
(guided-installation-test): New procedures.
(%extra-packages, installation-os-for-gui-tests)
(%test-gui-installed-os): New variable.
2020-03-05 23:40:23 +01:00
Ludovic Courtès
43e282accc
tests: Factorize LUKS passphrase.
* gnu/tests/install.scm (%luks-passphrase): New variable.
(%encrypted-root-installation-script): Use it.
(enter-luks-passphrase): Use it.
2020-02-22 00:45:42 +01:00
Ludovic Courtès
3adf320e44
tests: install: "raid-root-os" test uses RAID-1 instead of RAID-0.
Fixes <https://bugs.gnu.org/38086>.
Thanks to Vagrant and Tobias!

* gnu/tests/install.scm (%raid-root-os)[initrd-modules]: Add "raid1"
instead of "raid0".
(%raid-root-installation-script): Make the partitions twice as big.
Invoke 'mdadm' with '--level=mirror' instead of '--level=stripe';
connect "yes" to its stdin.
(%test-raid-root-os): Set #:target-size to 2.8 GiB.
2020-01-19 23:11:37 +01:00
Tobias Geerinckx-Rice
4f51fdba01
tests: install: Test a JFS root file system.
* gnu/tests/install.scm (%jfs-root-os, %jfs-root-installation-script)
(%test-jfs-root-os): New variables.
2020-01-03 13:54:13 +01:00
Maxim Cournoyer
1a034f043e
tests: install: Fix typo.
* gnu/tests/install.scm (run-install): Fix typo in docstring.
2019-11-18 13:22:15 +09:00
Ludovic Courtès
198a7ac02f
tests: install: Increase root partition size.
1.2G had become slightly too small on x86_64.
This is a followup to 8dfb0c969e.

* gnu/tests/install.scm (%simple-installation-script)
(%extlinux-gpt-installation-script)
(%simple-installation-script-for-/dev/vda): Switch from 1.2G to 1.4G.
2019-11-06 12:12:51 +01:00
Ludovic Courtès
8dfb0c969e
tests: encrypted-root-os: Increase root partition size.
1.2G had become slightly too small on x86_64.

* gnu/tests/install.scm (%encrypted-root-installation-script): Increase
root partition size to 1.3G.
2019-07-06 16:17:24 +02:00
Ludovic Courtès
f9d55c4925
tests: Import (guix build utils) in the marionette.
* gnu/tests/install.scm (%minimal-os)[marionette-configuration](imported-modules):
Add (guix build utils).
* gnu/tests/base.scm (run-basic-test)["skeletons in home directories"]:
Use (guix build utils) explicitly.
2019-06-24 17:50:08 +02:00
Ludovic Courtès
9fcfe30d28
system: Add 'operating-system-with-gc-roots'.
* gnu/tests/install.scm (operating-system-with-gc-roots): Move to...
* gnu/system.scm (operating-system-with-gc-roots): ... here.  New
procedure.
2019-05-15 16:36:21 +02:00
Ludovic Courtès
307ec7324b
tests: separate-store-os: Increase root partition size.
* gnu/tests/install.scm (%separate-store-installation-script): Increase
size of the root partition so that it's big enough to contain
downloaded nars and temporary files.  Add 'df -h /mnt/gnu'.
2019-04-14 17:42:08 +02:00
Ludovic Courtès
cf848cc0a1
accounts: Add default value for the 'home-directory' field of <user-account>.
* gnu/system/accounts.scm (<user-account>)[home-directory]: Mark as
thunked and add a default value.
(default-home-directory): New procedure.
* doc/guix.texi (User Accounts): Remove 'home-directory' from example.
* gnu/system/examples/bare-bones.tmpl: Likewise.
* gnu/system/examples/beaglebone-black.tmpl: Likewise.
* gnu/system/examples/desktop.tmpl: Likewise.
* gnu/system/examples/docker-image.tmpl: Likewise.
* gnu/system/examples/lightweight-desktop.tmpl: Likewise.
* gnu/system/install.scm (installation-os): Likewise.
* gnu/tests.scm (%simple-os): Likewise.
* gnu/tests/install.scm (%minimal-os, %minimal-os-on-vda):
(%separate-home-os, %encrypted-root-os, %btrfs-root-os): Likewise.
* tests/accounts.scm ("allocate-passwd")
("allocate-passwd with previous state"): Likewise.
2019-03-25 23:37:06 +01:00
Ludovic Courtès
59e8044588
Remove traces of "GuixSD".
* gnu/bootloader/extlinux.scm (extlinux-configuration-file): Remove
mentions of "GuixSD".
* gnu/bootloader/grub.scm (install-grub-efi): Likewise.
* gnu/build/vm.scm (make-iso9660-image): Change default #:volume-id to
"Guix_image".
(initialize-hard-disk): Search for the "Guix_image" label.
* gnu/ci.scm (system-test-jobs, tarball-jobs): Remove "GuixSD".
* gnu/installer/newt/welcome.scm (run-welcome-page): Likewise.
* gnu/packages/audio.scm (supercollider)[description]: Likewise.
* gnu/packages/curl.scm (curl): Likewise.
* gnu/packages/emacs.scm (emacs): Likewise.
* gnu/packages/gnome.scm (network-manager): Likewise.
* gnu/packages/julia.scm (julia): Likewise.
* gnu/packages/linux.scm (alsa-plugins): Likewise.
(powertop, wireless-regdb): Likewise.
* gnu/packages/package-management.scm (guix): Likewise.
* gnu/packages/polkit.scm (polkit): Likewise.
* gnu/packages/tex.scm (texlive-bin): Likewise.
* gnu/services/base.scm (file-systems->fstab): Likewise.
* gnu/services/cups.scm (%cups-activation): Likewise.
* gnu/services/mail.scm (%dovecot-activation): Likewise.
* gnu/services/messaging.scm (prosody-configuration)[log]: Likewise.
* gnu/system/examples/vm-image.tmpl (vm-image-motd): Likewise.
* gnu/system/install.scm (installation-os)[file-systems]: Change root
file system label to "Guix_image".
* gnu/system/mapped-devices.scm (check-device-initrd-modules):
Remove "GuixSD".
* gnu/system/vm.scm (system-docker-image): Likewise.
(system-disk-image)[root-label]: Change to "Guix_image".
* gnu/tests/install.scm (run-install): Remove "GuixSD".
* guix/modules.scm (guix-module-name?): Likewise.
* nix/libstore/optimise-store.cc: Likewise.
2019-03-13 23:12:43 +01:00
Ludovic Courtès
2d04076332
gnu: Remove duplicate record fields.
* gnu/packages/haskell.scm (ghc-case-insensitive): Remove duplicate
'inputs' field.
* gnu/packages/python-xyz.scm (python2-pysnptools): Remove duplicate
'native-inputs' field.
* gnu/tests/install.scm (%separate-home-os): Remove duplicate 'type'
field.
2019-01-22 23:04:05 +01:00
Mathieu Othacehe
4f83afd28a
tests: Rename %test-encrypted-os to %test-encrypted-root-os.
* gnu/tests/install.scm (%test-encrypted-os): Rename to
%test-encrypted-root-os for consistency with its system-test name.
2019-01-17 14:04:21 +01:00
Ludovic Courtès
040ae18819
tests: Increase root partitions size to 1.2G.
The system closure has grown slightly above 1GiB so adjust accordingly.

* gnu/tests/install.scm (%simple-installation-script): Increase vdb2 size of
1.2G,
(%extlinux-gpt-installation-script); ditto
(%simple-installation-script-for-/dev/vda): ditto,
(%separate-store-installation-script): ditto for vdb3,
(%encrypted-root-installation-script): ditto.
2018-12-04 20:30:50 +01:00
Ludovic Courtès
9ceeca0880
system: Remove uses of the 'title' field of <file-system>.
* gnu/system/install.scm (installation-os): Remove uses of the 'title'
field of 'file-system'; use 'file-system-label' as appropriate.
* gnu/system/vm.scm (system-disk-image, system-qemu-image): Likewise.
* gnu/tests.scm (%simple-os): Likewise.
* gnu/tests/install.scm (%minimal-os, %minimal-extlinux-os)
(%minimal-os-on-vda, %separate-home-os, %separate-store-os)
(%raid-root-os, %encrypted-root-os, %btrfs-root-os): Likewise.
* gnu/build/shepherd.scm (default-mounts)[tmpfs]: Likewise.
* tests/guix-system.sh: Likewise.
* tests/system.scm (%root-fs): Likewise.
("operating-system-boot-mapped-devices, implicit dependency"): Likewise.
2018-05-28 13:24:19 +02:00
Ludovic Courtès
bc499b113a
system: Add 'initrd-modules' field.
* gnu/system.scm (<operating-system>)[initrd-modules]: New field.
(operating-system-initrd-file): Pass #:linux-modules to 'make-initrd'.
* gnu/system/linux-initrd.scm (default-initrd-modules): New procedure.
(%base-initrd-modules): New macro.
(base-initrd): Add #:linux-modules and honor it.
* gnu/system/install.scm (embedded-installation-os): Use
'initrd-modules' instead of 'initrd'.
* gnu/tests/install.scm (%raid-root-os): Likewise.
* doc/guix.texi (operating-system Reference): Add 'initrd-modules'.
(Initial RAM Disk): Document it.  Adjust example to not use
 #:extra-modules.
2018-03-02 13:53:10 +01:00
Tobias Geerinckx-Rice
fdfdecdb7e
gnu, doc, tests: Use ‘bootloader-configuration’ everywhere.
* doc/guix.texi (Proceeding with the Installation): Replace the old-style
‘grub-configuration’ with the newer ‘bootloader-configuration’ syntax.
* gnu/system/examples/vm-image.tmpl: Likewise.
* gnu/system/install.scm (installation-os): Likewise.
* gnu/tests.scm (%simple-os): Likewise.
* gnu/tests/install.scm (%minimal-os, %minimal-os-on-vda, %separate-home-os)
(%separate-store-os, %raid-root-os, %encrypted-root-os, %btrfs-root-os):
Likewise.
* gnu/tests/nfs.scm (%base-os): Likewise.
* tests/guix-system.scm (OS_BASE, make_user_config): Likewise.
* tests/system.scm (%os, %os-with-mapped-device): Likewise.
2017-12-06 15:02:24 +01:00
Oleg Pykhalov
5724a14e71
tests: install: Increase target-size.
1200 MiB are too small for a btrfs-root-os, thus let increase it.

* gnu/tests/install.scm (run-install): Increase target-size to 2200 MiB.
(%btrfs-root-installation-script): Increase my-root partition size to 2G.
2017-11-15 00:48:09 +03:00
Hartmut Goebel
91496dfc9a
tests: install: Estimate the installation system disk size.
1500 MiB are too small for a current system, thus let
system-disk-image estimate the required size.

* gnu/tests/install.scm: (run-install): Pass "#:disk-image-size
  'guess" to system-disk-image.
2017-10-30 09:12:56 +01:00
Ludovic Courtès
945a8fc240
tests: install: Switch to modifying the gc-root-service-type.
Fixes <https://bugs.gnu.org/28600>.
Fixes a regression introduced in
4e854b1814.
Reported by Christopher Baines <mail@cbaines.net>.

* gnu/tests/install.scm (operating-system-with-gc-roots): Use
'simple-service' to extend GC-ROOT-SERVICE-TYPE instead of instantiating
it.
2017-09-26 10:43:10 +02:00
Ludovic Courtès
4e39604111
tests: Fix incorrect use of 'file-append'.
Fixes a regression introduced in fbc7b1f125.

* gnu/tests/install.scm (run-install)[install]: Don't use 'file-append'
with a string as its first argument; use a gexp with 'string-append' instead.
Use a gexp instead of a list for "-cdrom IMG".
2017-09-08 00:11:21 +02:00
Christopher Baines
fbc7b1f125
tests: Add test for installing from an ISO Image.
* gnu/tests/install.scm (%test-iso-image-installer): New variable.
  (run-install): Add #:installation-disk-image-file-system-type as a keyword
  argument.
2017-09-06 08:43:56 +01:00
Andy Wingo
045ebb3e58
gnu: bootloader: Deprecate "device" field in favor of "target".
* gnu/bootloader.scm (<bootloader-configuration>): Deprecate "device" field in
favor of "target" field.  This is mostly a renaming but also a generalization
to support UEFI targets being paths to a mounted partition instead of a device
name.
* gnu/system/examples/bare-bones.tmpl:
* gnu/system/examples/desktop.tmpl:
* gnu/system/examples/lightweight-desktop.tmpl:
* gnu/system/examples/vm-image.tmpl:
* gnu/system/install.scm:
* gnu/tests.scm:
* gnu/tests/install.scm:
* gnu/tests/nfs.scm:
* tests/system.scm: Adapt all invocations of bootloader-configuration.
* guix/scripts/system.scm (perform-action): Rename device argument to
bootloader-target.
(process-action): Adapt caller.
* doc/guix.texi (Proceeding with the Installation):
* doc/guix.texi (Bootloader Configuration): Update documentation.
2017-08-23 22:23:19 +02:00
宋文武
59132b8000
gnu: Rename (gnu packages qemu) to (gnu packages virtualization).
* gnu/packages/qemu.scm: Rename this ...
* gnu/packages/virtualization.scm: ... to this.
* gnu/local.mk (GNU_SYSTEM_MODULES),
gnu/packages/bootloaders.scm, gnu/packages/debug.scm,
gnu/packages/gnome.scm, gnu/system/vm.scm,
gnu/tests/install.scm: Adjust accordingly.
2017-07-15 19:17:37 +08:00
Mathieu Othacehe
a48a20fb98
tests: Add extlinux gpt test.
* gnu/tests/install.scm (%test-installed-extlinux-os): New exported
  variable.
(%minimal-extlinux-os, %minimal-extlinux-os-source): New variables.
(%extlinux-gpt-installation-script): New variable.
(run-install)[packages]: New argument. The packages specified are
appended to the installation image.
2017-06-21 09:57:12 +02:00
Ludovic Courtès
ae763b5b0b
system: Create home directories once 'file-systems' is up.
Fixes <http://bugs.gnu.org/21108>.
Reported by Andy Patterson <ajpatter@uwaterloo.ca>
and Leo Famulari <leo@famulari.name>.

* gnu/build/activation.scm (activate-users+groups)[activate-user]: Pass
  #:create-home? #t iff CREATE-HOME? and SYSTEM?.
(activate-user-home): New procedure.
* gnu/system/shadow.scm (account-shepherd-service): New procedure.
(account-service-type)[extensions]: Add SHEPHERD-ROOT-SERVICE-TYPE
extension.
* gnu/tests/base.scm (run-basic-test)["home"]
["skeletons in home directories"]: New tests.
* gnu/tests/install.scm (%separate-home-os, %separate-home-os-source)
(%test-separate-home-os): New variables.
2017-02-01 12:36:41 +01:00
Ludovic Courtès
384344198d
file-systems: 'file-system-needed-for-boot?' is #t for parents of the store.
Suggested by John Darrington <john@darrington.wattle.id.au>.

* gnu/system/file-systems.scm (%not-slash): New variable.
(file-prefix?): New procedure.
(file-system-needed-for-boot?): Use it to check whether FS holds the
store.
* tests/file-systems.scm ("file-system-needed-for-boot?"): New test.
* gnu/tests/install.scm (%separate-store-os)[file-systems]: Remove
'needed-for-boot?' field for "/gnu".
2017-01-16 23:27:23 +01:00
David Craven
b1a505baf6
system: Add btrfs file system support.
* gnu/build/file-systems.scm (%btrfs-endianness, btrfs-superblock?,
  read-btrfs-superblock, btrfs-superblock-uuid,
  btrfs-superblock-volume-name, check-btrfs-file-system): New variables.
  (%paritition-label-readers, %partition-uuid-readers): Add btrfs
  readers.
* gnu/system/linux-initrd.scm (linux-modules): Add btrfs modules when a
  btrfs file-system is used.
* gnu/tests/install.scm (%btrfs-root-os %btrfs-root-os-source,
  %btrfs-root-installation-script, %test-btrfs-root-os): New system
  test.
* doc/guix.texi: Adjust accordingly.

Fixes <http://bugs.gnu.org/19280>.
2017-01-10 12:00:35 +01:00
Ludovic Courtès
130079ae27
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'.
2016-11-30 17:35:20 +01:00
Ludovic Courtès
f7f292d359
install: Enable "cryptodisk" handling in GRUB.
This allows 'grub-install' to do the right thing when / or /boot is a
LUKS-encrypted partition.

Fixes <http://bugs.gnu.org/21843>.

* gnu/build/install.scm (install-grub): Add 'setenv' to set
'GRUB_ENABLE_CRYPTODISK'.
(wait-for-screen-text): New test.
* gnu/tests/base.scm (run-basic-test): Add #:initialization parameter
and honor it.
* gnu/tests/install.scm (%encrypted-root-os)[kernel-arguments]: Remove.
(%encrypted-root-installation-script): Pass '--uuid' to 'cryptsetup
luksFormat'.  Remove 'sed' invocation.
(enter-luks-passphrase): New procedure.
(%test-encrypted-os)[value]: Pass #:initialization to 'run-basic-test'.
2016-11-23 21:13:18 +01:00
Ludovic Courtès
245cc5f5d5
tests: Test installation with a RAID root partition.
* gnu/tests/install.scm (%raid-root-os, %raid-root-os-source)
(%raid-root-installation-script, %test-raid-root-os): New variables.
2016-10-27 13:48:52 +02:00
Ludovic Courtès
b800b8da21
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.
2016-10-27 13:48:52 +02:00
Ludovic Courtès
5479aa2b7c
tests: Test installation with store on a separate partition.
This is a followup to 0f65f54ebd.

* gnu/tests/install.scm (%separate-store-os, %separate-store-os-source)
(%separate-store-installation-script, %test-separate-store-os): New
variables.
2016-10-27 01:00:42 +02:00
Ludovic Courtès
b1bf155ffd
tests: install: Generalize 'run-install'.
* gnu/tests/install.scm (%simple-installation-script): New variable.
Contains installation script formerly in 'run-install'.
(run-install): Add 'target-os', 'target-os-source', and #:script
parameters.  Honor them.
(qemu-command/writable-image): New procedure.
(%test-installed-os): Use it.
2016-07-18 01:26:03 +02:00
Ludovic Courtès
4ee96a7912
gnu: Switch to 'with-imported-modules'.
* gnu/services.scm (directory-union): Use 'with-imported-modules'
instead of the '#:modules' argument of 'computed-file'.
* gnu/services/base.scm (udev-rules-union): Likewise.
* gnu/services/dbus.scm (system-service-directory): Likewise.
* gnu/services/desktop.scm (wrapped-dbus-service):
(polkit-directory): Likewise.
* gnu/services/networking.scm (tor-configuration->torrc): Likewise.
* gnu/services/xorg.scm (xorg-configuration-directory): Likewise.
* gnu/system/install.scm (self-contained-tarball): Likewise.
* gnu/system/linux-container.scm (container-script): Likewise.
* gnu/system/linux-initrd.scm (expression->initrd): Likewise, and
remove #:modules parameter.
(flat-linux-module-directory): Use 'with-imported-modules'.
(base-initrd): Likewise.
* gnu/system/locale.scm (locale-directory): Likewise.
* gnu/system/shadow.scm (default-skeletons): Likewise.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise.
* gnu/tests/base.scm (run-basic-test): Likewise.
* gnu/tests/install.scm (run-install): Likewise.
* doc/guix.texi (Initial RAM Disk): Update 'expression->initrd'
documentation.
2016-07-12 22:47:08 +02:00
Ludovic Courtès
a4bbf41b25
tests: install: Adjust to new 'marionette-service-type' interface.
This is a followup to 037f9e07cd.
Reported by Mark H Weaver.

* gnu/tests/install.scm (%minimal-os): Pass a <marionette-configuration>
object as the value for the MARIONETTE-SERVICE-TYPE.
2016-07-02 14:59:30 +02:00
Ludovic Courtès
f6d5456b1b
tests: Installation test no longer requires KVM.
* gnu/tests/install.scm (%test-installed-os): Use '-enable-kvm' only
when /dev/kvm exists.
2016-06-23 00:12:13 +02:00
Ludovic Courtès
98b65b5ff6
tests: Add a mechanism to describe and discover system tests.
* gnu/tests.scm (<system-test>): New record type.
(write-system-test, test-modules, fold-system-tests)
(all-system-tests): New procedures.
* gnu/tests/base.scm (%test-basic-os): Turn into a <system-test>.
* gnu/tests/install.scm (%test-installed-os): Likewise.
* build-aux/run-system-tests.scm (%system-tests): Remove.
(run-system-tests): Use 'all-system-tests'.
2016-06-20 23:50:46 +02:00
Ludovic Courtès
94b4274d0d
tests: Add system installation test.
* gnu/tests.scm (define-os-with-source): New macro.
* gnu/tests/install.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* build-aux/run-system-tests.scm (%system-tests): Likewise.
2016-06-20 23:50:46 +02:00