diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2025-03-10 00:21:26 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2025-03-10 00:38:05 +0100 |
| commit | d0510dcd824e1b3fda62a8841e792581d7b8de8d (patch) | |
| tree | 0e486c0b0f7add9ae4dd7e68c16cb347d640a001 /gnu/tests/install.scm | |
| parent | ac2681310878ca841a91020f4211bff4369a8f72 (diff) | |
gnu: Adjust tests for ‘shepherd-system-log-service-type’.
This is a followup to 8492a3c8962664db4bd0e7475f63be0ef59db87a.
* 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
Diffstat (limited to 'gnu/tests/install.scm')
| -rw-r--r-- | gnu/tests/install.scm | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index b799a6752e6..a837637b182 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016-2023 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2016-2023, 2025 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2017, 2019, 2021 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org> @@ -52,6 +52,7 @@ #:use-module (gnu packages xorg) #:use-module (gnu services desktop) #:use-module (gnu services networking) + #:use-module (gnu services shepherd) #:use-module (gnu services xorg) #:use-module (guix store) #:use-module (guix monads) @@ -1783,27 +1784,25 @@ build (current-guix) and then store a couple of full system images.") ;;; Installation through the graphical interface. ;;; -(define %syslog-conf - ;; Syslog configuration that dumps to /dev/console, so we can see the - ;; installer's messages during the test. - (computed-file "syslog.conf" - #~(begin - (copy-file #$%default-syslog.conf #$output) - (chmod #$output #o644) - (let ((port (open-file #$output "a"))) - (display "\n*.info /dev/console\n" port) - #t)))) - (define (operating-system-with-console-syslog os) "Return OS with a syslog service that writes to /dev/console." (operating-system (inherit os) - (services (modify-services (operating-system-user-services os) - (syslog-service-type config - => - (syslog-configuration - (inherit config) - (config-file %syslog-conf))))))) + (services + (modify-services (operating-system-user-services os) + (shepherd-system-log-service-type + config + => + (system-log-configuration + (inherit config) + (message-destination + #~(lambda (message) + (let ((destinations ((default-message-destination-procedure) + message))) + (if (<= (system-log-message-priority message) + (system-log-priority info)) + (cons "/dev/console" destinations) + destinations)))))))))) (define %root-password "foo") |
