diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-07-03 15:29:37 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-07-03 17:50:04 +0200 |
commit | 3c78f5b5c341aa741a39417e6007dbaf369438f8 (patch) | |
tree | 8fb58ccc47fc42695672f6640572e63c438c5ac2 /gnu/tests/base.scm | |
parent | 86eee976f5ef21fa132de9827ad09a026bfdfd63 (diff) | |
download | guix-3c78f5b5c341aa741a39417e6007dbaf369438f8.tar.gz |
tests: basic: Wait for /var/run/shepherd/socket to be ready.
* gnu/tests/base.scm (run-basic-test)["shepherd socket ready"]: New test.
Diffstat (limited to 'gnu/tests/base.scm')
-rw-r--r-- | gnu/tests/base.scm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index 4c24cf57f6..0efb4a6e55 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -100,6 +100,23 @@ initialization step, such as entering a LUKS passphrase." version) (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" ;; Is everything in $PATH? (zero? (marionette-eval '(system " |