summaryrefslogtreecommitdiff
path: root/gnu/tests.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2025-03-15 19:28:44 +0100
committerLudovic Courtès <ludo@gnu.org>2025-03-23 19:30:12 +0100
commitcaf5869a1d88bb4a40705916b120cc31f25ccd09 (patch)
treebbe93fb3b2cc01bf6c4fb55f01cd82d63db76f50 /gnu/tests.scm
parent59bd1337d07f5bbbe4d75edb4e0e7b75ff338bd0 (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.scm21
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 @@
53 53
54 %simple-os 54 %simple-os
55 simple-operating-system 55 simple-operating-system
56 operating-system-with-console-syslog
56 57
57 system-test 58 system-test
58 system-test? 59 system-test?
@@ -268,6 +269,26 @@ the system under test."
268 (services (cons* user-services ... %base-services)))) 269 (services (cons* user-services ... %base-services))))
269 270
270 271
272(define (operating-system-with-console-syslog os)
273 "Return OS with a system log service that writes to /dev/console."
274 (operating-system
275 (inherit os)
276 (services
277 (modify-services (operating-system-user-services os)
278 (shepherd-system-log-service-type
279 config
280 =>
281 (system-log-configuration
282 (inherit config)
283 (message-destination
284 #~(lambda (message)
285 (let ((destinations ((default-message-destination-procedure)
286 message)))
287 (if (<= (system-log-message-priority message)
288 (system-log-priority info))
289 (cons "/dev/console" destinations)
290 destinations))))))))))
291
271 292
272;;; 293;;;
273;;; Tests. 294;;; Tests.