1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-13 10:30:43 +02:00
Commit graph

102 commits

Author SHA1 Message Date
Mathieu Othacehe
7c820cd888
tests: Fix the gui installation tests.
This is a follow-up of: 4c017ccfe5. The
run-basic-test procedure is used for the gui installation tests, but the
etc-profile-d-service-type and etc-bashrc-d-service-type services that are now
needed are only defined in the test-basic-os procedure.

Build upon the introduction of the extra-tests argument to define the
etc-profile-d-service-type and etc-bashrc-d-service-type specific tests
directly in the test-basic-os procedure.

* gnu/tests/base.scm (run-basic-test): Move the etc-profile-d-service-type and
etc-bashrc-d-service-type dedicated tests to ...
(test-basic-os): ... that procedure, where the matching services are defined.

Change-Id: I050f5ab87e19889bc90cc1a375a3cc28ea9a43ab
2025-07-01 11:50:16 +02:00
Mathieu Othacehe
11b5443e48
tests: Support basic tests extension with an extra-tests argument.
* gnu/tests/base.scm (run-basic-test)[extra-tests]: New argument.

Change-Id: Ia3595638309738d3361c583c93a66e0a872adabe
2025-07-01 11:50:16 +02:00
Mathieu Othacehe
f3a8db842d
tests: Really test the etc-bashrc-d-service-type service.
Follow-up of: 4c017ccfe5.

The --init-file script will only be run in the context of an interactive
shell, which is not the case here. Use the `-i` argument instead to force an
interactive shell. That way, the test_bashrc_d.sh is now really executed.

* gnu/tests/base.scm (run-basic-test): Fix the etc-bashrc-d-service-type test.

Change-Id: I3d749f65f51ff103c76f4e3d60746ae963660329
2025-07-01 11:50:15 +02:00
Maxim Cournoyer
c743d646ee
system: Factorize bashrc default configuration.
This factorizes out the remaining bashrc bits from /etc/skel/.bashrc to a the
template used for both /etc/bashrc on Guix System and ~/.bashrc for
home-bash-service-type.

Rationale: The use of /etc/skel introduce state: the file is only copied
originally when the user account is created, and never (automatically)
refreshed again.

* gnu/system.scm (operating-system-etc-service):
<profile>: Guard against souring /etc/bashrc in non-interactive, SSH case.
<bashrc>: Use %default-bashrc, having migrated the remaining definitions to...
* gnu/system/shadow.scm (%default-bashrc): ... here.  Factorize aliases to...
* gnu/services.scm (%default-bash-aliases): ... here.
(%default-bashrc-d-aliases): New variable.
(%default-etc-bashrc-d-files): Include it in the default configuration.
* gnu/services/base.scm (%base-services): Register etc-bashrc-d-service-type.
* gnu/home/services/shells.scm (add-bash-configuration): Do not set PS1, now
part of %default-bashrc.
(home-bash-configuration) [guix-defaults?]: Update doc.
[aliases]: Set %default-bash-aliases as the default value.  Update doc.
* doc/guix.texi (Shells Home Services): Update documentation.
(Service Reference): Update example.

Change-Id: I340c614983a78fd20a9c4a9705e7fc542ae9b513
2025-05-26 13:43:03 +09:00
Maxim Cournoyer
4c017ccfe5
services: Add etc-bashrc-d-service-type.
* gnu/services.scm (files->bashrc-d-directory) New procedure.
(etc-bashrc-d-service-type): New service type.
* doc/guix.texi (Service Reference): Document it.
* gnu/tests/base.scm (test-basic-os): Test it.

Change-Id: Ibbb0f684de7aee296adedbce5b1192786d661af2
2025-05-26 13:43:03 +09:00
Maxim Cournoyer
279adf431b
services: Add etc-profile-d-service-type.
* gnu/services.scm (make-files->etc-directory)
(files->profile-d-entries): New procedures.
(etc-profile-d-service-type): New service type.
* doc/guix.texi (Service Reference): Document it.
* gnu/tests/base.scm (run-basic-test): Test it.

Change-Id: I45dde43a1b9603c3384b933ebd1d6e45dba146b9
2025-05-26 13:43:03 +09:00
Maxim Cournoyer
3bb6147fdc
services: udev: Also create subsystem nodes at boot.
This is a more correct fix to CDROM/DVDROM events/auto-mounting than was made
in the now-reverted commit 670724edcf ("gnu: eudev: Fix optical discs
detection/auto-mounting.")

This changes causes the 60-block.rules udev rules file shipped with eudev to
correctly set the default polling period to 2000 ms on block devices, which is
necessary for kernel events to be fired for CDROM drives for example.  To
validate it is set:

  # cat /sys/module/block/parameters/events_dfl_poll_msecs
  2000

Before, it would return 0.

* gnu/services/base.scm (udev-shepherd-service): <#:start>: Add a 'udevadm
trigger --change=add --type=subsystems' invocation, so that it also creates
subsystem nodes, as done in Void Linux or LinuxFromScratch init scripts for
example.
* gnu/tests/base.scm (run-basic-test): Add test.

Fixes: <https://issues.guix.gnu.org/35584>
Change-Id: Idc0eb5640163b27e41b72cc0c1885412a60805c1
2025-05-14 22:10:44 +09:00
Maxim Cournoyer
fbf8b81971
tests: Fix (gnu tests base.scm) module indentation.
* gnu/tests/base.scm: Fix indentation.

Change-Id: I3432fafa2f5c2853a14b5d125cf9377786ca6594
2025-05-06 23:22:25 +09:00
Maxim Cournoyer
10cb04d8ac
tests: Fix indentation of (gnu tests base).
* gnu/tests/base.scm: Fix indentation.

Change-Id: I84ae82a8ce85ff0113a3eb1215b11c191d3929d6
2025-05-06 16:32:06 +09:00
Ludovic Courtès
e2583b5a17
services: guix: Allow ‘guix-daemon’ to run without root privileges.
* gnu/services/base.scm (run-with-writable-store)
(guix-ownership-change-program): New procedures.
(<guix-configuration>)[privileged?]: New field.
(guix-shepherd-service): Rename to…
(guix-shepherd-services): … this.   Add the ‘guix-ownership’ service.
Change ‘guix-daemon’ service to depend on it; when unprivileged,
prefix ‘daemon-command’ by ‘run-with-writable-store’ and
omit ‘--build-users-group’; adjust socket activation endpoints.
(guix-accounts): When unprivileged, create the “guix-daemon” user and
group in addition to the others.
(guix-service-type)[extensions]: Adjust to name change.
* gnu/tests/base.scm (run-guix-daemon-test): Add ‘name’ parameter.
(%test-guix-daemon): Adjust accordingly.
(%test-guix-daemon-unprivileged): New test.
* doc/guix.texi (Base Services): Document ‘privileged?’.
(Migrating to the Unprivileged Daemon): Explain that this is automatic
on Guix System.

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Change-Id: I28a9a22e617416c551dccb24e43a253b544ba163
2025-04-20 18:52:59 +02:00
Ludovic Courtès
2c7c059e0b
tests: guix-daemon: Wait for the ‘guix-daemon’ service to be up.
* gnu/tests/base.scm (run-guix-daemon-test): Add “guix-daemon service is
up” test.

Change-Id: I4d44a1248599fec45c854c285d4da201c30eb00c
2025-04-20 18:50:52 +02:00
Ludovic Courtès
6367e69f50
tests: guix-daemon: Send system log output to /dev/console.
* gnu/tests/base.scm (%daemon-os): New variable.
(%test-guix-daemon): Use it.

Change-Id: Iea31808cc59e94971ea4cbc12d565c94348bf7a4
2025-04-20 18:50:52 +02:00
Ludovic Courtès
3511dab3f7
tests: Factorize ‘guix-daemon’ test cases.
* gnu/tests/base.scm (guix-daemon-test-cases): New procedure, with code
moved from…
(run-guix-daemon-test): … here. Use it.
* gnu/tests/foreign.scm (run-foreign-install-test): Likewise.

Change-Id: I6f2d03d30d7b7648b6eb7e77e36c3da54f80d79c
2025-03-10 15:41:34 +01:00
Ludovic Courtès
39c890cacf
tests: Factorize ‘%hello-dependencies-manifest’.
* gnu/tests/base.scm (%hello-dependencies-manifest): Export.
* gnu/tests/foreign.scm (%installation-tarball-manifest): Use it.

Change-Id: Id92232f479ab5d1f0c48036b0546e3745aa63e52
2025-03-10 15:41:33 +01:00
Ludovic Courtès
9e07d889c4
tests: Add ‘guix-daemon’ test.
* gnu/tests/base.scm (manifest-entry-without-grafts): New procedure.
(%hello-dependencies-manifest): New variable.
(run-guix-daemon-test): New procedure.
(%test-guix-daemon): New variable.

Change-Id: Ia37966de1f61fb428e6fb2244271bf389a74af6d
2025-03-10 15:41:33 +01:00
Ludovic Courtès
75e3d34295
tests: Move Avahi test to its own file.
This mirrors the (gnu services avahi) module.

* gnu/tests/base.scm (%avahi-os, run-nss-mdns-test, %test-nss-mdns):
Move to…
* gnu/tests/avahi.scm: … here.  New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.

Change-Id: I04705e57408619d948c928873c40c470aa4e949d
2025-03-10 15:41:33 +01:00
Ludovic Courtès
7e4627f9c7
tests: Move mcron test to its own file.
This mirrors the (gnu services mcron) module.

* gnu/tests/base.scm (%mcron-os, run-mcron-test, %test-mcron): Move to…
* gnu/tests/mcron.scm: … here.  New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.

Change-Id: Id2830d08d8e797e008c5fec7964fb5f6a5ea2fad
2025-03-10 15:41:33 +01:00
Ludovic Courtès
d0510dcd82
gnu: Adjust tests for ‘shepherd-system-log-service-type’.
This is a followup to 8492a3c896.

* gnu/services/virtualization.scm (%minimal-vm-syslog-config): Remove.
(%system-log-message-destination): New variable.
(%virtual-build-machine-operating-system): Use it, and modify
‘shepherd-system-log-service-type’ instead of ‘syslog-service-type’.
* gnu/tests/base.scm (%avahi-os): Likewise.
* gnu/tests/install.scm (%syslog-conf): Remove.
(operating-system-with-console-syslog): Modify
‘shepherd-system-log-service-type’ instead of ‘syslog-service-type’.
* gnu/tests/nfs.scm (%nfs-os, run-nfs-full-test): Likewise.
* gnu/tests/reconfigure.scm (run-kexec-test): Likewise.

Change-Id: I142d34ad27594a538f5b75daf087e48c690171b8
2025-03-10 00:38:05 +01:00
Leo Famulari
1dcd0ded86
gnu: Add linux-libre-6.12.
* gnu/packages/linux.scm (linux-libre-6.12-version,
linux-libre-6.12-gnu-revision, deblob-scripts-6.12,
linux-libre-6.12-pristine-source, linux-libre-6.12-source,
linux-libre-headers-6.12, linux-libre-6.12): New variables.
(linux-libre-headers-latest): Use linux-libre-headers-6.12.
(linux-libre-lts-version, linux-libre-lts-gnu-revision,
linux-libre-lts-pristine-source, linux-libre-lts-source, linux-libre-lts): Use
linux-libre 6.12.
* gnu/tests/base.scm (%test-linux-libre-6.12): New test.
* gnu/packages/aux-files/linux-libre/6.12-arm.conf,
gnu/packages/aux-files/linux-libre/6.12-arm64.conf,
gnu/packages/aux-files/linux-libre/6.12-i686.conf,
gnu/packages/aux-files/linux-libre/6.12-x86_64.conf,
gnu/packages/aux-files/linux-libre/6.12-riscv.conf: New files.
* Makefile.am (AUX_FILES): Add them.

Change-Id: I430d9dd29cda4bd4b66ad6eddc004935f93bb111
2025-01-07 18:13:45 -05:00
Leo Famulari
92bfa12254
tests: Add tests for all the longterm-support kernels.
* gnu/tests/base.scm (%test-linux-libre-6.6, %test-linux-libre-6.1): New tests.

Change-Id: Ica31ae263348c38ac21efeb65d9a245e1a877268
2025-01-07 18:13:45 -05:00
Leo Famulari
7b40b9d2d2
gnu: Remove linux-libre 4.19.
This kernel series is no longer supported upstream.

* gnu/packages/linux.scm (linux-libre-4.19-version,
linux-libre-4.19-gnu-revision, deblob-scripts-4.19,
linux-libre-4.19-pristine-source, linux-libre-4.19-source,
linux-libre-headers-4.19, linux-libre-4.19, linux-libre-arm-generic-4.19,
linux-libre-arm-omap2plus-4.19): Remove variables.
* gnu/tests/base.scm (%test-linux-libre-4.19): Remove variable.
* gnu/packages/aux-files/linux-libre/4.19-arm.conf,
gnu/packages/aux-files/linux-libre/4.19-arm64.conf,
gnu/packages/aux-files/linux-libre/4.19-i686.conf,
gnu/packages/aux-files/linux-libre/4.19-x86_64.conf: Delete files.
* Makefile.am (AUX_FILES): Remove them.

Change-Id: If79ccbb948975c544b27757104d360539970377c
2025-01-04 12:19:36 -05:00
Dariqq
cc67a0b71d
gnu: system: Privilege programs after creating accounts.
Ensure that users and groups are already created when the privileging script
runs. The order these scripts appear in the folded activation-service depends
on the order these services are instantiated in the operating-system.

Fixes <https://issues.guix.gnu.org/73680>.

* gnu/system.scm (operating-system-default-essential-services): Move
privileged-program-service above account-service.
(hurd-default-essential-services): Likewise.
* gnu/tests/base.scm (%activation-os): New variable.
(run-activation-test): New procedure.
(%test-activation): New variable.

Change-Id: I59a191c5519475f256e81bdf2dc4cb01b96c31fe
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-10-24 14:50:09 +02:00
Ludovic Courtès
f92151133d
services: cleanup: Reintroduce explicit ‘chmod’ calls.
This reverts commit e74d05db53.

* gnu/services.scm (cleanup-gexp): Introduce explicit ‘chmod’ calls
after ‘mkdir’ calls.
* gnu/tests/base.scm (run-basic-test)[test]("permissions on /tmp"):
New test.

Reported-by: Hilton Chain <hako@ultrarare.space>
Change-Id: I1e14dbe52eac526d2ed4ec1dd9c6fd9036f96a63
2024-09-25 17:53:53 +02:00
Ludovic Courtès
a9d8ad6595
tests: base: Compare all the service provisions, not just canonical names.
* gnu/tests/base.scm (run-basic-test)["shepherd services"]: Use
‘append-map’ on live service provisions to match what
‘operating-system-shepherd-service-names’ does.

Change-Id: Ie54082eed6c7b8d37d3428711e71c11e80940235
2024-07-18 17:31:18 +02:00
Wilko Meyer
10a1935963
gnu: Remove linux-libre 4.14.
* gnu/packages/linux.scm (linux-libre-4.14-version,
linux-libre-4.14-gnu-revision, deblob-scripts-4.14,
linux-libre-4.14-pristine-source, linux-libre-4.14-source,
linux-libre-headers-4.14, linux-libre-4.14, linux-libre-arm-generic-4.14,
linux-libre-arm-omap2plus-4.14): Remove variables.
* gnu/packages/aux-files/linux-libre/4.14-arm.conf,
gnu/packages/aux-files/linux-libre/4.14-i686.conf,
gnu/packages/aux-files/linux-libre/4.14-x86_64.conf: Delete files.
* Makefile.am (AUX_FILES): Remove aforementioned .conf files.
* gnu/tests/base.scm (%test-linux-libre-4.14): Remove variable.

Change-Id: I40393b5f46b989848d569c929f1d9c986736553e
2024-01-22 13:24:20 -05:00
Ludovic Courtès
fb32e226ce
tests: Use the client 'start-service' procedure.
The previous code worked "by chance": 'start' from (shepherd service)
happened to be in scope because the marionette REPL is created by a mere
'primitive-fork', and 'start' happened to kinda work.

* gnu/tests/base.scm (run-basic-test): Use 'start-service' from (gnu
services herd), not 'start' from (shepherd service), which is not
supposed to work.
* gnu/tests/install.scm (run-install): Likewise.
2023-04-21 16:16:38 +02:00
Bruno Victal
2799ad4423
services: dbus: Deprecate 'dbus-service' procedure.
* doc/guix.texi (Desktop Services): Replace with 'dbus-root-service-type'.
Document dbus-configuration.
* gnu/services/dbus.scm (dbus-service): Define with 'define-deprecated'.
* gnu/services/desktop.scm (desktop-services-for-system): Replace with
dbus-root-service-type.
* gnu/system/install.scm (%installation-services): Ditto.
* gnu/tests/base.scm (%avahi-os): Ditto.
* gnu/tests/docker.scm (%docker-os): Ditto.
* gnu/tests/lightdm.scm (minimal-desktop-services): Ditto.
* gnu/tests/virtualization.scm (%libvirt-os): Ditto.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:35 +01:00
Leo Famulari
064c5b7e45
gnu: Remove linux-libre 4.9.
This kernel series is no longer supported upstream:
https://lkml.iu.edu/hypermail/linux/kernel/2301.0/06398.html
https://www.kernel.org/category/releases.html

* gnu/packages/aux-files/linux-libre/4.9-i686.conf,
gnu/packages/aux-files/linux-libre/4.9-x86_64.conf: Delete files.
* Makefile.am (AUX_FILES): Remove them.
* gnu/packages/linux.scm (linux-libre-4.9-version, linux-libre-4.9-gnu-revision,
deblob-scripts-4.9, linux-libre-4.9-pristine-source, linux-libre-4.9-source,
linux-libre-headers-4.9, linux-libre-4.9): Remove variables.
* gnu/tests/base.scm (%test-linux-libre-4.9): Likewise.
2023-01-08 15:15:09 -05:00
Marius Bakke
2c1b488d19
tests: Add system tests for each supported kernel version.
* gnu/tests/base.scm (%test-basic-os): Rename to ...
(test-basic-os): ... this, and turn into procedure that takes optional KERNEL
argument.
(%test-basic-os): Use that procedure.
(%test-linux-libre-5.15, %test-linux-libre-5.10, %test-linux-libre-5.4,
%test-linux-libre-4.19, %test-linux-libre-4.14, %test-linux-libre-4.9): New
tests.
2022-12-12 20:23:32 +01:00
Ludovic Courtès
8d9647d8a7
services: Add Shepherd 'configuration' action to various services.
* gnu/services/avahi.scm (avahi-shepherd-service): Add 'actions' field.
* gnu/services/base.scm (nscd-actions): Add call to
'shepherd-configuration-action'.
* gnu/services/desktop.scm (upower-shepherd-service): Add 'actions'
field.
(elogind-shepherd-service): Likewise.
* gnu/services/dict.scm (dicod-shepherd-service): Likewise.
* gnu/services/networking.scm (openntpd-shepherd-service): Likewise.
(tor-shepherd-service): Likewise.
* gnu/services/ssh.scm (openssh-shepherd-service): Likewise.
* gnu/services/web.scm (nginx-shepherd-service): Likewise.
* gnu/services/xorg.scm (gdm-shepherd-service): Likewise.
* gnu/tests/base.scm (run-basic-test)["nscd configuration action"]: New
test.
* doc/guix.texi (Services): Document it.
2022-11-18 15:44:39 +01:00
Ludovic Courtès
00b9ab0a83
tests: root-unmount: Wait for the first QEMU process to finish.
There was a tiny possibility that the first QEMU process would still be
running by the time we launch the second one.

* gnu/build/marionette.scm (marionette-pid): Export.
* gnu/tests/base.scm (run-root-unmount-test)[test]: Add 'waitpid' call.
2022-11-17 11:10:09 +01:00
Maxim Cournoyer
21f641e9fa
marionette: Make marionette-screen-text private.
It has only one user, which is better suited for wait-for-screen-text anyway.

* gnu/tests/base.scm (run-basic-test): Refactor to use wait-for-screen-text
instead of marionette-screen-text.
2022-10-07 10:11:11 -04:00
Maxim Cournoyer
42fee6d0f1
build: marionette: Add support for Tesseract OCR.
* gnu/build/marionette.scm (invoke-ocrad-ocr): New procedure.
(invoke-tesseract-ocr): Likewise.
(marionette-screen-text): Rename the #:ocrad argument to #:ocr.  Dispatch the
matching OCR invocation procedure.
(wait-for-screen-text): Rename the #:ocrad argument to #:ocr.
* gnu/tests/base.scm (run-basic-test): Adjust accordingly.
* gnu/tests/install.scm (enter-luks-passphrase): Likewise.
(enter-luks-passphrase-for-home): Likewise.
2022-08-28 22:10:20 -04:00
Ludovic Courtès
9f530ef38a
image: Add default value for partition initializer.
Previously, the default value would lead to a wrong-type-to-apply crash.

* gnu/system/image.scm (system-disk-image)[image-builder]: When
'partition-initializer' returns #f, fall back to
INITIALIZE-ROOT-PARTITION.
* gnu/tests/base.scm (run-root-unmount-test)[test-image]: Remove
'initializer' field of partition.
* gnu/image.scm (<partition>)[initializer]: Add comment.
2022-07-01 12:10:28 +02:00
Ludovic Courtès
0483c71cc5
services: root-file-system: Cleanly unmount upon shutdown.
Fixes <https://issues.guix.gnu.org/56209>.
Reported by angry rectangle <angryrectangle@cock.li>.

* gnu/packages/admin.scm (shepherd-0.9)[modules, snippet]: New fields.
* gnu/services/base.scm (%root-file-system-shepherd-service): In 'stop'
method, remove 'call-with-blocked-asyncs'.  When 'mount' throws to
'system-error, call (@ (fibers) sleep) and try again.
* gnu/tests/base.scm (run-root-unmount-test): New procedure.
(%test-root-unmount): New variable.
2022-07-01 12:10:28 +02:00
Maxim Cournoyer
947b8f99d4
tests: install: Adjust the timeouts on two failing tests.
The 'login on tty1' and 'getlogin on tty1' tests were failing on a machine
equipped with slower hard drives.

* gnu/tests/base.scm (run-basic-test)
["login on tty1", "getlogin on tty1"]: Bump timeout from 10 to 30 s.
2022-03-19 11:08:30 -04:00
Ludovic Courtès
8c801194b5
gnu: glibc: Look for the current timezone in /etc/localtime.
Fixes <https://issues.guix.gnu.org/50830>.
Reported by podiki on #guix.

Previously, glibc 2.33 would look for
/gnu/store/...-glibc-2.33/etc/localtime instead of /etc/localtime.

* gnu/packages/base.scm (glibc)[arguments]: Remove #:make-flags.
[phases]: In 'pre-configure', modify 'inet/Makefile' instead of
'sunrpc/Makefile' since this is where these bits are in 2.33.
(glibc-2.31)[arguments]: Add 'set-etc-rpc-installation-directory'
phase.
(glibc-2.30): Inherit from GLIBC-2.31.
* gnu/tests/base.scm (run-basic-test)["libc honors /etc/localtime"]: New
test.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2021-11-11 10:31:29 -05:00
Mathieu Othacehe
d27e871ebb
tests: base: Fix the screendump test.
* gnu/tests/base.scm (run-basic-test): Look for the screendump capture where
it has been saved, in the output directory.
2021-09-27 20:07:16 +00:00
Ludovic Courtès
89b0544293
tests: Reduce boilerplate for users of 'system-test-runner'.
* gnu/tests/audio.scm, gnu/tests/base.scm, gnu/tests/ci.scm,
gnu/tests/cups.scm, gnu/tests/databases.scm, gnu/tests/desktop.scm,
gnu/tests/dict.scm, gnu/tests/docker.scm, gnu/tests/file-sharing.scm,
gnu/tests/ganeti.scm, gnu/tests/guix.scm, gnu/tests/ldap.scm,
gnu/tests/linux-modules.scm,
gnu/tests/mail.scm, gnu/tests/messaging.scm, gnu/tests/monitoring.scm,
gnu/tests/networking.scm, gnu/tests/nfs.scm,
gnu/tests/package-management.scm, gnu/tests/reconfigure.scm,
gnu/tests/rsync.scm, gnu/tests/security-token.scm,
gnu/tests/singularity.scm, gnu/tests/ssh.scm, gnu/tests/telephony.scm,
gnu/tests/version-control.scm, gnu/tests/virtualization.scm,
gnu/tests/web.scm: Remove (mkdir #$output) (chdir #$output) and
pass #$output as argument to 'system-test-runner'.
2021-09-26 23:20:56 +02:00
Ludovic Courtès
1fb75128a5
tests: Adjust to SRFI-64 as found in Guile 3.0.7.
In Guile 3.0.7, 'test-runner-current' is set to #f upon 'test-end'.
Consequently, the previous strategy, where we'd call
'test-runner-current' after 'test-end', no longer works.  Instead, set
the test runner in each test right before 'test-begin'.

* gnu/build/marionette.scm (system-test-runner): New procedure.
* gnu/tests/audio.scm (run-mpd-test): Replace (exit (= ...)) idiom
by (test-runner-current (system-test-runner)).
* gnu/tests/base.scm (run-basic-test)
(run-cleanup-test, run-mcron-test, run-nss-mdns-test): Likewise.
* gnu/tests/ci.scm (run-laminar-test): Likewise.
* gnu/tests/cups.scm (run-cups-test): Likewise.
* gnu/tests/databases.scm (run-memcached-test)
(run-postgresql-test, run-mysql-test): Likewise.
* gnu/tests/desktop.scm (run-elogind-test): Likewise.
* gnu/tests/dict.scm (run-dicod-test): Likewise.
* gnu/tests/docker.scm (run-docker-test): Likewise.
(run-docker-system-test): Likewise.
* gnu/tests/file-sharing.scm (run-transmission-daemon-test): Likewise.
* gnu/tests/ganeti.scm (run-ganeti-test): Likewise.
* gnu/tests/guix.scm (run-guix-build-coordinator-test): Likewise.
(run-guix-data-service-test): Likewise.
* gnu/tests/ldap.scm (run-ldap-test): Likewise.
* gnu/tests/linux-modules.scm (run-loadable-kernel-modules-test-base): Likewise.
* gnu/tests/mail.scm (run-opensmtpd-test)
(run-exim-test, run-dovecot-test, run-getmail-test): Likewise.
* gnu/tests/messaging.scm (run-xmpp-test)
(run-bitlbee-test, run-quassel-test): Likewise.
* gnu/tests/monitoring.scm (run-prometheus-node-exporter-server-test)
(run-zabbix-server-test): Likewise.
* gnu/tests/networking.scm (run-inetd-test, run-openvswitch-test)
(run-dhcpd-test, run-tor-test, run-iptables-test, run-ipfs-test): Likewise.
* gnu/tests/nfs.scm (run-nfs-test)
(run-nfs-server-test, run-nfs-root-fs-test): Likewise.
* gnu/tests/package-management.scm (run-nix-test): Likewise.
* gnu/tests/reconfigure.scm (run-switch-to-system-test)
(run-upgrade-services-test, run-install-bootloader-test): Likewise.
* gnu/tests/rsync.scm (run-rsync-test): Likewise.
* gnu/tests/security-token.scm (run-pcscd-test): Likewise.
* gnu/tests/singularity.scm (run-singularity-test): Likewise.
* gnu/tests/ssh.scm (run-ssh-test): Likewise.
* gnu/tests/telephony.scm (run-jami-test): Likewise.
* gnu/tests/version-control.scm (run-cgit-test): Likewise.
(run-git-http-test, run-gitolite-test, run-gitile-test): Likewise.
* gnu/tests/virtualization.scm (run-libvirt-test, run-childhurd-test): Likewise.
* gnu/tests/web.scm (run-webserver-test, run-php-fpm-test)
(run-hpcguix-web-server-test, run-tailon-test, run-patchwork-test): Likewise.
2021-09-25 18:52:05 +02:00
Mathieu Othacehe
822eacc6bb
tests: halt: Fix it.
This fixes: <https://issues.guix.gnu.org/47727>.  The OCR prompt detection is
failing, so remove it altogether.  It looks like the test doesn't need the
prompt detection delay to work properly.

* gnu/tests/base.scm (run-halt-test): Remove failing OCR detection.
2021-04-13 10:02:46 +02:00
Mathieu Othacehe
572c59a7a1
tests: Fix nss-mdns test.
* gnu/tests/base.scm (run-nss-mdns-test): Use full "avahi-browse" path.
2020-10-26 16:33:39 +01:00
Mathieu Othacehe
6e71514a29
tests: install: Fix gui-installed-desktop-os-encrypted test.
* gnu/tests/base.scm (run-basic-test): Add a 'desktop?' argument. Wait 30
seconds before trying to switch to TTY1 on desktop.
* gnu/tests/install.scm (guided-installation-test): Use 512MiB of RAM and pass
the desktop argument to "run-basic-test".
2020-09-10 14:59:53 +02:00
Ludovic Courtès
3302e03ba0
services: guix: Add 'set-http-proxy' action.
Fixes <https://bugs.gnu.org/25569>.
Reported by Divan Santana <divan@santanas.co.za>.

* gnu/services/base.scm (shepherd-set-http-proxy-action): New procedure.
(guix-shepherd-service): Add 'actions' field.  Change 'start' to a
lambda; check the value of the "http_proxy" environment variable and
add "http_proxy" and "https_proxy" to #:environment-variables as a
function of that.
* gnu/tests/base.scm (run-basic-test)["guix-daemon set-http-proxy
action", "guix-daemon set-http-proxy action, clear"]: New tests.
* doc/guix.texi (Base Services): Document it.
2020-04-07 12:31:36 +02:00
Ludovic Courtès
d7113bb655
services: syslog: Create log files as non-world-readable.
Partly fixes <https://bugs.gnu.org/40405>.
Reported by Diego Nicola Barbato <dnbarbato@posteo.de>.

* gnu/services/base.scm (syslog-service-type): Change 'start' method to
set umask to #o137 before spawning syslogd.
* gnu/tests/base.scm (run-basic-test)["/var/log/messages is not
world-readable"]: New test.
2020-04-06 23:56:24 +02:00
Ludovic Courtès
91ba90c18b
tests: 'run-basic-test' can enter a root password.
* gnu/tests/base.scm (run-basic-test): Add #:root-password and honor it.
2020-03-05 23:40:22 +01: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
33572a3662
tests: Skip unreliable "herd invalidate nscd" test.
* gnu/tests/base.scm (run-basic-test)["nscd invalidate action, wrong
table"]: Skip unconditionally.
2019-05-15 12:18:51 +02:00
Ludovic Courtès
8b310793d2
tests: 'getlogin' test creates its file atomically.
Previously we could end up reading an empty /root/login-id file.

* gnu/tests/base.scm (run-basic-test)["getlogin on tty1"]: Create
/root/login-id atomically.
2019-05-15 12:18:51 +02:00
Ludovic Courtès
e6b1a2248f
services: Log-in services now require "pam_loginuid".
Fixes <https://bugs.gnu.org/35553>.
Reported by Bruno Haible <bruno@clisp.org>.

* gnu/services/base.scm (login-pam-service): Pass #:login-uid? #t to
'unix-pam-service'.
* gnu/services/ssh.scm (lsh-pam-services, openssh-pam-services):
Likewise.
* gnu/services/xorg.scm (slim-pam-service): Likewise.
(gdm-pam-service): Likewise for "gdm-autologin" and "gdm-password".
* gnu/tests/base.scm (run-basic-test)["getlogin on tty1"]: New test.
* gnu/tests/ssh.scm (run-ssh-test): Add #:test-getlogin? parameter.
["getlogin"]: New test.
(%test-dropbear): Pass #:test-getlogin? #f.
2019-05-09 12:11:36 +02:00