summaryrefslogtreecommitdiff
path: root/gnu/tests/base.scm
Commit message (Collapse)AuthorAge
* tests: mcron: Adjust use of 'wait-for-file'.Ludovic Courtès2017-09-26
| | | | | | | | | | Fixes a regression introduced in 8bd5231485cdeb02078c4294badb3a1e7caa0fe0, whereby returning #<eof> would no longer work (since #<eof> would be in the cdr of the result, and thus it would not get converted to a string.) * gnu/tests/base.scm (run-mcron-test)["root's job with command"]: Pass #:read to 'wait-for-file'.
* marionette: 'wait-for-file' can be passed a read procedure.Ludovic Courtès2017-09-08
| | | | | | | * gnu/build/marionette.scm (wait-for-file): Add #:read parameter and honor it. * gnu/tests/base.scm (run-basic-test)["login on tty1"]: Use 'wait-for-file' instead of inline code.
* services: user-processes: Reap child processes.Ludovic Courtès2017-08-28
| | | | | | | | | | Fixes <http://bugs.gnu.org/26931>. Reported by Leo Famulari <leo@famulari.name>. * gnu/services/base.scm (user-processes-service-type)[stop]: Add 'reap-children' loop. * gnu/tests/base.scm (run-halt-test): New procedure. (%test-halt): New variable.
* tests: Use 'virtual-machine' records instead of monadic procedures.Ludovic Courtès2017-07-20
| | | | | | | | | | | | | | | * gnu/tests/base.scm (%test-basic-os): Use 'let*' instead of 'mlet*' and 'virtual-machine' instead of 'system-qemu-image/shared-store-script'. (run-mcron-test): Likewise. (run-nss-mdns-test): Likewise. * gnu/tests/dict.scm (run-dicod-test): Likewise. * gnu/tests/mail.scm (run-opensmtpd-test): Likewise. (run-exim-test): Likewise. * gnu/tests/messaging.scm (run-xmpp-test): Likewise. * gnu/tests/networking.scm (run-inetd-test): Likewise. * gnu/tests/nfs.scm (run-nfs-test): Likewise. * gnu/tests/ssh.scm (run-ssh-test): Likewise. * gnu/tests/web.scm (run-nginx-test): Likewise.
* marionette: Factorize 'wait-for-file'.Ludovic Courtès2017-06-12
| | | | | | | | | | | * gnu/build/marionette.scm (wait-for-file): New procedure. * gnu/tests/base.scm (run-mcron-test)[test](wait-for-file): Remove. Pass second argument in 'wait-for-file' calls. * gnu/tests/ssh.scm (run-ssh-test)[test](wait-for-file): Remove. Pass second argument in 'wait-for-file' calls. * gnu/tests/messaging.scm (run-xmpp-test)[test](guest-wait-for-file): Remove. Use 'wait-for-file' instead, with second argument.
* activation: Change permissions on /root to #o700.Ludovic Courtès2017-05-30
| | | | | | | | | Reported by Alex Griffin <a@ajgrf.com>. Fixes <http://bugs.gnu.org/27135>. * gnu/build/activation.scm (add-user): When UID is zero, add 'chmod' call. * gnu/tests/base.scm (run-basic-test)["permissions on /root"]: New test.
* services: user-homes: Do not create home directories marked as no-create.Ludovic Courtès2017-05-18
| | | | | | | | | | | | Fixes a bug whereby GuixSD would create the /nonexistent directory, from user 'nobody', even though it has 'create-home-directory?' set to #f. * gnu/build/activation.scm (activate-users+groups): Add comment for \#:create-home?. (activate-user-home)[ensure-user-home]: Skip when CREATE-HOME? is #f or SYSTEM? is #t. * gnu/tests/base.scm (run-basic-test)["no extra home directories"]: New tests.
* tests: "basic" test loads (guix …) modules from the right place.Ludovic Courtès2017-05-13
| | | | | | | | This is a followup to 7561881f2a5d2dc463c24713745eca03e67044bf. * gnu/tests/base.scm (run-basic-test)["/run/current-system is a GC root"]: Remove 'set!' statements, add 'add-to-load-path' statement for GUIX.
* tests: Strengthen GC root test.Ludovic Courtès2017-05-13
| | | | | * gnu/tests/base.scm (run-basic-test)["/run/current-system is a GC root"]: Check for a specific return value, 'success!.
* services: 'service-parameters' becomes 'service-value'.Ludovic Courtès2017-04-16
| | | | | | | | | * gnu/services.scm (<service>)[parameters]: Rename to... [value]: ... this. Change calls to 'service-parameters' to 'service-value'. * gnu/system.scm, gnu/tests/base.scm, guix/scripts/system.scm, tests/services.scm: Likewise. * doc/guix.texi (Service Reference): Adjust accordingly.
* tests: Introduce 'simple-operating-system' and use it.Ludovic Courtès2017-04-01
| | | | | | | | | | | | | | * gnu/tests.scm (%simple-os): New macro. (simple-operating-system): New macro. * gnu/tests/base.scm (%simple-os): Define using 'simple-operating-system'. (%mcron-os): Use 'simple-operating-system'. * gnu/tests/mail.scm (%opensmtpd-os): Likewise. * gnu/tests/messaging.scm (%base-os, os-with-service): Remove. (run-xmpp-test): Use 'simple-operating-system'. * gnu/tests/networking.scm (%inetd-os): Likewise. * gnu/tests/ssh.scm (%base-os, os-with-service): Remove. (run-ssh-test): Use 'simple-operating-system'. * gnu/tests/web.scm (%nginx-os): Likewise.
* services: Add 'special-files-service-type'.Ludovic Courtès2017-02-08
| | | | | | | | | | | | | * gnu/build/activation.scm (activate-/bin/sh): Remove. (activate-special-files): New procedure. * gnu/services.scm (activation-script): Remove call to 'activate-/bin/sh'. (special-files-service-type): New variable. (extra-special-file): New procedure. * gnu/services/base.scm (%base-services): Add SPECIAL-FILES-SERVICE-TYPE instance. * gnu/tests/base.scm (run-basic-test)[special-files]: New variables. ["special files"]: New test.
* activation: Set the right owner for home directories.Ludovic Courtès2017-02-04
| | | | | | | | | | | | | | This fixes a regression introduced in ae763b5b0b7d5e7316a3d0efe991fe8ab2261031 whereby home directories and skeletons would be root-owned. * gnu/build/activation.scm (copy-account-skeletons): Make 'directory' a keyword parameter. Add #:uid and #:gid and honor them. [set-owner]: New procedure. (activate-user-home): Add call to 'getpw' and 'chown'. Pass UID and GID to 'copy-account-skeletons'. * gnu/tests/base.scm (run-basic-test)["skeletons in home directories"]: Test file ownership under HOME.
* system: Create home directories once 'file-systems' is up.Ludovic Courtès2017-02-01
| | | | | | | | | | | | | | | | | 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.
* services: Create /var/log/wtmp upon activation.Ludovic Courtès2017-01-24
| | | | | | | | This fixes a bug whereby /var/log/wtmp would never be created, and thus accounting information would be lost. * gnu/services.scm (activation-script): Create /var/log/wtmp. * gnu/tests/base.scm (run-basic-test)["wtmp entry"]: New test.
* services: Create /var/run/utmpx upon activation.Ludovic Courtès2017-01-19
| | | | | | | | This fixes a bug whereby /var/run/utmpx would never be created, and thus accounting information would be missing. * gnu/services.scm (activation-script): Create /var/run/utmpx. * gnu/tests/base.scm (run-basic-test)["utmpx entry"]: New test.
* tests: Remove 'GUIX_LOCPATH' hack that had been added for glibc@2.23.Ludovic Courtès2016-11-23
| | | | | | * gnu/tests/base.scm (run-basic-test)[test]("locale"): Remove 'GUIX_LOCPATH' hack, which is no longer needed since commit 9f58fe3d1c32e3f0ced065e286532a10cad1b5e3.
* install: Enable "cryptodisk" handling in GRUB.Ludovic Courtès2016-11-23
| | | | | | | | | | | | | | | | | | 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'.
* marionette: Add 'marionette-screen-text' using OCR.Ludovic Courtès2016-11-23
| | | | | * gnu/build/marionette.scm (marionette-screen-text): New procedure. * gnu/tests/base.scm (run-basic-test)["screen text"]: New test.
* tests: basic: Fix harmless thinko.Ludovic Courtès2016-11-17
| | | | | | | * gnu/tests/base.scm (run-basic-test)["login on tty1"]: Move the file-waiting loop inside the 'marionette-eval' body. Before that, we were waiting for the file to appear on the host, which would never happen, meaning that we were always waiting for 15 seconds.
* services: syslog: Use syslog-configuration.David Craven2016-09-06
| | | | | | | | | * gnu/services/base.scm (<syslog-configuration>): New variable. (syslog-service-type): Use <syslog-configuration>. (syslog-service): Use <syslog-configuration>. * gnu/tests/base.scm (%avahi-os): Use <syslog-configuration>. * doc/guix.texi (syslog-configuration-type): Add @deftp. (syslog-service): Update @deffn.
* services: herd: Provide <live-service> objects.Ludovic Courtès2016-08-31
| | | | | | | | | | * gnu/services/herd.scm (<live-service>): New record type. (current-services): Change to return a single value: #f or a list of <live-service>. * guix/scripts/system.scm (call-with-service-upgrade-info): Adjust accordingly. * gnu/tests/base.scm (run-basic-test)["shepherd services"]: Adjust accordingly.
* tests: Make sure /var/guix/gcroots/profiles is a valid symlink.Ludovic Courtès2016-08-29
| | | | | | | | | | Reported by csanchezdll@gmail.com (Carlos Sánchez de La Lama) at <https://lists.gnu.org/archive/html/guix-devel/2016-08/msg01641.html>. * gnu/build/install.scm (directives): Add /var/guix/gcroots/profiles symlink. * gnu/tests/base.scm (run-basic-test)["/var/guix/gcroots/profiles is a valid symlink"]: New test.
* tests: Make sure /run/current-system is a GC root.Ludovic Courtès2016-08-29
| | | | | * gnu/tests/base.scm (run-basic-test)["/run/current-system is a GC root"]: New test.
* system: Define 'GUIX_LOCPATH' to work around 'glibc' package defect.Ludovic Courtès2016-08-02
| | | | | | | | | | | Our 'glibc' package currently ignores /run/current-system/locale, although the intent is to look for locales in that directory. * gnu/packages/base.scm (glibc/linux): Add comment about /run/current-system/locale being ignored. * gnu/system.scm (operating-system-environment-variables): Add 'GUIX_LOCPATH'. * gnu/tests/base.scm (run-basic-test): Add "locale" test.
* gnu: Switch to 'with-imported-modules'.Ludovic Courtès2016-07-12
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
* tests: Add Avahi and NSS-mDNS test.Ludovic Courtès2016-06-27
| | | | | | * gnu/tests/base.scm (%avahi-os): New variable. (run-nss-mdns-test): New procedure. (%test-nss-mdns): New variable.
* tests: base: Add host name resolution tests.Ludovic Courtès2016-06-27
| | | | | * gnu/tests/base.scm (run-basic-test)["host name resolution", "host not found"]: New tests.
* tests: basic: Don't hard-code the expected architecture name.Ludovic Courtès2016-06-23
| | | | | * gnu/tests/base.scm (run-basic-test)["uname"]: Don't hard-code the architecture.
* services: Add 'mcron-service'.Ludovic Courtès2016-06-22
| | | | | | | | * gnu/services/mcron.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/tests/base.scm (%mcron-os, %test-mcron): New variables. (run-mcron-test): New procedure. * doc/guix.texi (Scheduled Job Execution): New node.
* tests: Add a mechanism to describe and discover system tests.Ludovic Courtès2016-06-20
| | | | | | | | | | * 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'.
* tests: base: Fully honor the OS passed to 'run-basic-test'.Ludovic Courtès2016-06-20
| | | | | | * gnu/tests/base.scm (run-basic-test)["uname"]: Use the host name of OS. ["shepherd services"]: Use service names from OS. (%test-basic-os): Add call to 'virtualized-operating-system'.
* tests: Export 'run-basic-test'.Ludovic Courtès2016-06-20
| | | | | * gnu/tests/base.scm (run-basic-test): New procedure, extracted from ... (%test-basic-os): ... here. Use it.
* system: tests: Use 'start-service' to wait for service.Ludovic Courtès2016-05-08
| | | | | * gnu/tests/base.scm (%test-basic-os): Use 'start-service' instead of a busy loop to wait for 'term-tty1'.
* tests: Add whole-system test.Ludovic Courtès2016-05-04
* gnu/system/vm.scm (virtualized-operating-system): Export. * gnu/tests/base.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * Makefile.am (check-system): New target.