mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 21:59:08 -05:00
tests: basic: Wait for /var/run/shepherd/socket to be ready.
* gnu/tests/base.scm (run-basic-test)["shepherd socket ready"]: New test.
This commit is contained in:
parent
86eee976f5
commit
3c78f5b5c3
1 changed files with 17 additions and 0 deletions
|
@ -100,6 +100,23 @@ (define marionette
|
||||||
version)
|
version)
|
||||||
(string-prefix? architecture %host-type)))))
|
(string-prefix? architecture %host-type)))))
|
||||||
|
|
||||||
|
;; Shepherd reads the config file *before* binding its control
|
||||||
|
;; socket, so /var/run/shepherd/socket might not exist yet when the
|
||||||
|
;; 'marionette' service is started.
|
||||||
|
(test-assert "shepherd socket ready"
|
||||||
|
(marionette-eval
|
||||||
|
`(begin
|
||||||
|
(use-modules (gnu services herd))
|
||||||
|
(let loop ((i 10))
|
||||||
|
(cond ((file-exists? (%shepherd-socket-file))
|
||||||
|
#t)
|
||||||
|
((> i 0)
|
||||||
|
(sleep 1)
|
||||||
|
(loop (- i 1)))
|
||||||
|
(else
|
||||||
|
#f))))
|
||||||
|
marionette))
|
||||||
|
|
||||||
(test-assert "shell and user commands"
|
(test-assert "shell and user commands"
|
||||||
;; Is everything in $PATH?
|
;; Is everything in $PATH?
|
||||||
(zero? (marionette-eval '(system "
|
(zero? (marionette-eval '(system "
|
||||||
|
|
Loading…
Reference in a new issue