aboutsummaryrefslogtreecommitdiff
path: root/gnu/tests/messaging.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2017-06-18 02:36:51 -0400
committerMark H Weaver <mhw@netris.org>2017-06-18 02:36:51 -0400
commit9d4385634d098cc0fb35bfe58179f7d855352e39 (patch)
tree653cfd7a6faecaf42129b1aa47703e7bd01bc471 /gnu/tests/messaging.scm
parenta6aff3528c32cc921bddd78b254678a1fc121f21 (diff)
parent96fd87c96bd6987a967575aaa931c5a7b1c84e21 (diff)
downloadpatches-9d4385634d098cc0fb35bfe58179f7d855352e39.tar
patches-9d4385634d098cc0fb35bfe58179f7d855352e39.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/tests/messaging.scm')
-rw-r--r--gnu/tests/messaging.scm18
1 files changed, 2 insertions, 16 deletions
diff --git a/gnu/tests/messaging.scm b/gnu/tests/messaging.scm
index cefb52534a..b76b8e8434 100644
--- a/gnu/tests/messaging.scm
+++ b/gnu/tests/messaging.scm
@@ -80,21 +80,6 @@
(number->string #$port)
"-:5222"))))
- (define (guest-wait-for-file file)
- ;; Wait until FILE exists in the guest; 'read' its content and
- ;; return it.
- (marionette-eval
- `(let loop ((i 10))
- (cond ((file-exists? ,file)
- (call-with-input-file ,file read))
- ((> i 0)
- (begin
- (sleep 1))
- (loop (- i 1)))
- (else
- (error "file didn't show up" ,file))))
- marionette))
-
(define (host-wait-for-file file)
;; Wait until FILE exists in the host.
(let loop ((i 60))
@@ -124,7 +109,8 @@
;; Check XMPP service's PID.
(test-assert "service process id"
- (let ((pid (number->string (guest-wait-for-file #$pid-file))))
+ (let ((pid (number->string (wait-for-file #$pid-file
+ marionette))))
(marionette-eval `(file-exists? (string-append "/proc/" ,pid))
marionette)))