diff options
author | Leo Famulari <leo@famulari.name> | 2016-11-23 22:24:52 -0500 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2016-11-23 22:24:52 -0500 |
commit | 2ac7d54616819c65405ea27260dbff462160f290 (patch) | |
tree | 4c82001f0855ebab05ab342e342a680c533b9bf9 /gnu/tests | |
parent | 61320932edb42e78fb377b5d11cd6ecb32e2f9e6 (diff) | |
parent | 1c9f78eca1f7e169562abaaa882fd94d845208af (diff) | |
download | guix-2ac7d54616819c65405ea27260dbff462160f290.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/tests')
-rw-r--r-- | gnu/tests/base.scm | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index 5c2af5b6d4..9a265309c0 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -150,14 +150,20 @@ info --version") (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 |