aboutsummaryrefslogtreecommitdiff
path: root/gnu/tests/base.scm
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2016-11-23 00:11:30 -0500
committerLeo Famulari <leo@famulari.name>2016-11-23 00:11:30 -0500
commitde76f0a45bad2654cc2561b463e3d6ec4d96c398 (patch)
treee1dcd0a33de2d8dffaa9d4c5068fc1fd0f149734 /gnu/tests/base.scm
parentc70047f12d7e9d5138a1a217d0995882a8c5f459 (diff)
parent08b3e4a97066c9baaf39e3df7c2dd9c39e693ead (diff)
downloadpatches-de76f0a45bad2654cc2561b463e3d6ec4d96c398.tar
patches-de76f0a45bad2654cc2561b463e3d6ec4d96c398.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/tests/base.scm')
-rw-r--r--gnu/tests/base.scm20
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