system: tests: Use 'start-service' to wait for service.
* gnu/tests/base.scm (%test-basic-os): Use 'start-service' instead of a busy loop to wait for 'term-tty1'.
This commit is contained in:
parent
b8785cb944
commit
5a55564217
|
@ -128,17 +128,13 @@ info --version")
|
||||||
"root\n"
|
"root\n"
|
||||||
(begin
|
(begin
|
||||||
(marionette-control "sendkey ctrl-alt-f1" marionette)
|
(marionette-control "sendkey ctrl-alt-f1" marionette)
|
||||||
;; Wait for the 'term-tty1' service to be running
|
;; Wait for the 'term-tty1' service to be running (using
|
||||||
|
;; 'start-service' is the simplest and most reliable way to do
|
||||||
|
;; that.)
|
||||||
(marionette-eval
|
(marionette-eval
|
||||||
'(begin
|
'(begin
|
||||||
(use-modules (gnu services herd))
|
(use-modules (gnu services herd))
|
||||||
|
(start-service 'term-tty1))
|
||||||
(let loop ((i 0))
|
|
||||||
(when (> i 10)
|
|
||||||
(error "terminal service not running" (current-services)))
|
|
||||||
(unless (memq 'term-tty1 (current-services))
|
|
||||||
(sleep 1)
|
|
||||||
(loop (+ i 1)))))
|
|
||||||
marionette)
|
marionette)
|
||||||
|
|
||||||
;; Now we can type.
|
;; Now we can type.
|
||||||
|
|
Loading…
Reference in New Issue