diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2025-03-15 19:28:44 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2025-03-23 19:30:12 +0100 |
| commit | caf5869a1d88bb4a40705916b120cc31f25ccd09 (patch) | |
| tree | bbe93fb3b2cc01bf6c4fb55f01cd82d63db76f50 /gnu/tests.scm | |
| parent | 59bd1337d07f5bbbe4d75edb4e0e7b75ff338bd0 (diff) | |
tests: Make ‘operating-system-with-console-syslog’ public.
* gnu/tests/install.scm (operating-system-with-console-syslog): Move to…
* gnu/tests.scm (operating-system-with-console-syslog): … here. New
procedure.
Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Change-Id: I015e24525140365d09f22127d366107fdc9ca902
Diffstat (limited to 'gnu/tests.scm')
| -rw-r--r-- | gnu/tests.scm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gnu/tests.scm b/gnu/tests.scm index 84298de448d..abb70762089 100644 --- a/gnu/tests.scm +++ b/gnu/tests.scm @@ -53,6 +53,7 @@ %simple-os simple-operating-system + operating-system-with-console-syslog system-test system-test? @@ -268,6 +269,26 @@ the system under test." (services (cons* user-services ... %base-services)))) +(define (operating-system-with-console-syslog os) + "Return OS with a system log service that writes to /dev/console." + (operating-system + (inherit os) + (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)))))))))) + ;;; ;;; Tests. |
