mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
tests: basic: Fix harmless thinko.
* gnu/tests/base.scm (run-basic-test)["login on tty1"]: Move the file-waiting loop inside the 'marionette-eval' body. Before that, we were waiting for the file to appear on the host, which would never happen, meaning that we were always waiting for 15 seconds.
This commit is contained in:
parent
e9ff8d9ff1
commit
056d0b4034
1 changed files with 13 additions and 7 deletions
|
@ -150,14 +150,20 @@ (define marionette
|
|||
(marionette-type "root\n\nid -un > logged-in\n" marionette)
|
||||
|
||||
;; It can take a while before the shell commands are executed.
|
||||
(let loop ((i 0))
|
||||
(unless (or (file-exists? "/root/logged-in") (> i 15))
|
||||
(sleep 1)
|
||||
(loop (+ i 1))))
|
||||
(marionette-eval '(use-modules (rnrs io ports)) marionette)
|
||||
(marionette-eval '(call-with-input-file "/root/logged-in"
|
||||
get-string-all)
|
||||
marionette)))
|
||||
(marionette-eval
|
||||
'(let loop ((i 0))
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
(call-with-input-file "/root/logged-in"
|
||||
get-string-all))
|
||||
(lambda args
|
||||
(if (and (< i 15) (= ENOENT (system-error-errno args)))
|
||||
(begin
|
||||
(sleep 1)
|
||||
(loop (+ i 1)))
|
||||
(apply throw args)))))
|
||||
marionette)))
|
||||
|
||||
(test-assert "host name resolution"
|
||||
(match (marionette-eval
|
||||
|
|
Loading…
Reference in a new issue