[bug#77041,08/16] tests: Make ‘operating-system-with-console-syslog’ public.

Message ID 18ee01c05e82b666726f3709cad6fabafff9ae98.1742073920.git.ludo@gnu.org
State New
Headers
Series Replacing mcron jobs by Shepherd timers |

Commit Message

Ludovic Courtès March 15, 2025, 9:37 p.m. UTC
  * gnu/tests/install.scm (operating-system-with-console-syslog): Move to…
* gnu/tests.scm (operating-system-with-console-syslog): … here.  New
procedure.

Change-Id: I015e24525140365d09f22127d366107fdc9ca902
---
 gnu/tests.scm         | 21 +++++++++++++++++++++
 gnu/tests/install.scm | 20 --------------------
 2 files changed, 21 insertions(+), 20 deletions(-)
  

Patch

diff --git a/gnu/tests.scm b/gnu/tests.scm
index 84298de448..abb7076208 100644
--- a/gnu/tests.scm
+++ b/gnu/tests.scm
@@ -53,6 +53,7 @@  (define-module (gnu tests)
 
             %simple-os
             simple-operating-system
+            operating-system-with-console-syslog
 
             system-test
             system-test?
@@ -268,6 +269,26 @@  (define-syntax-rule (simple-operating-system user-services ...)
                     (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.
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index a837637b18..8293296339 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -1784,26 +1784,6 @@  (define %test-xfs-root-os
 ;;; Installation through the graphical interface.
 ;;;
 
-(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)
-       (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")
 
 (define* (gui-test-program marionette