GNU bug report logs -
#57168
[PATCH 00/14] Add a LightDM service.
Previous Next
Full log
Message #38 received at 57168 <at> debbugs.gnu.org (full text, mbox):
* gnu/build/marionette.scm (wait-for-screen-text): Return the last OCR'd text
when the predicate fails to match instead of the not useful predicate object.
---
gnu/build/marionette.scm | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/gnu/build/marionette.scm b/gnu/build/marionette.scm
index 4f409166db..24170bbd30 100644
--- a/gnu/build/marionette.scm
+++ b/gnu/build/marionette.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016-2022 Ludovic Courtès <ludo <at> gnu.org>
;;; Copyright © 2018 Chris Marusich <cmmarusich <at> gmail.com>
+;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -308,13 +309,14 @@ (define start
(define end
(+ start timeout))
- (let loop ()
+ (let loop ((last-text #f))
(if (> (car (gettimeofday)) end)
- (error "'wait-for-screen-text' timeout" predicate)
- (or (predicate (marionette-screen-text marionette #:ocrad ocrad))
- (begin
- (sleep 1)
- (loop))))))
+ (error "'wait-for-screen-text' timeout" 'ocr-text: last-text)
+ (let ((text (marionette-screen-text marionette #:ocrad ocrad)))
+ (or (predicate text)
+ (begin
+ (sleep 1)
+ (loop text)))))))
(define %qwerty-us-keystrokes
;; Maps "special" characters to their keystrokes.
--
2.36.1
This bug report was last modified 2 years and 269 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.