summary refs log tree commit diff
path: root/gnu/tests
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-08-12 11:23:29 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-08-28 22:10:20 -0400
commit42fee6d0f176aea5d208e3e6d8b5270abcf4173c (patch)
treeeabc7202187ee4ccda3e7e28c3223f5f9c9345ca /gnu/tests
parent697b797160f8145f282767cedd66be2d7297fe1e (diff)
downloadguix-42fee6d0f176aea5d208e3e6d8b5270abcf4173c.tar.gz
build: marionette: Add support for Tesseract OCR.
* gnu/build/marionette.scm (invoke-ocrad-ocr): New procedure.
(invoke-tesseract-ocr): Likewise.
(marionette-screen-text): Rename the #:ocrad argument to #:ocr.  Dispatch the
matching OCR invocation procedure.
(wait-for-screen-text): Rename the #:ocrad argument to #:ocr.
* gnu/tests/base.scm (run-basic-test): Adjust accordingly.
* gnu/tests/install.scm (enter-luks-passphrase): Likewise.
(enter-luks-passphrase-for-home): Likewise.
Diffstat (limited to 'gnu/tests')
-rw-r--r--gnu/tests/base.scm4
-rw-r--r--gnu/tests/install.scm8
2 files changed, 6 insertions, 6 deletions
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm
index 353d6d415a..636b127fb8 100644
--- a/gnu/tests/base.scm
+++ b/gnu/tests/base.scm
@@ -341,7 +341,7 @@ info --version")
                       (wait-for-screen-text marionette
                                             (lambda (text)
                                               (string-contains text "Password"))
-                                            #:ocrad
+                                            #:ocr
                                             #$(file-append ocrad "/bin/ocrad"))
                       (marionette-type (string-append password "\n\n")
                                        marionette))
@@ -510,7 +510,7 @@ info --version")
 
           (test-assert "screen text"
             (let ((text (marionette-screen-text marionette
-                                                #:ocrad
+                                                #:ocr
                                                 #$(file-append ocrad
                                                                "/bin/ocrad"))))
               ;; Check whether the welcome message and shell prompt are
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index fbb97d451c..4e0e274e66 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -784,7 +784,7 @@ to enter the LUKS passphrase."
             ;; At this point we have no choice but to use OCR to determine
             ;; when the passphrase should be entered.
             (wait-for-screen-text #$marionette passphrase-prompt?
-                                  #:ocrad #$ocrad)
+                                  #:ocr #$ocrad)
             (marionette-type #$(string-append %luks-passphrase "\n")
                              #$marionette)
 
@@ -792,7 +792,7 @@ to enter the LUKS passphrase."
             ;; we can then be sure we match the "Enter passphrase" prompt from
             ;; 'cryptsetup', in the initrd.
             (wait-for-screen-text #$marionette (negate bios-boot-screen?)
-                                  #:ocrad #$ocrad
+                                  #:ocr #$ocrad
                                   #:timeout 20)))
 
         (test-assert "enter LUKS passphrase for the initrd"
@@ -800,7 +800,7 @@ to enter the LUKS passphrase."
             ;; XXX: Here we use OCR as well but we could instead use QEMU
             ;; '-serial stdio' and run it in an input pipe,
             (wait-for-screen-text #$marionette passphrase-prompt?
-                                  #:ocrad #$ocrad
+                                  #:ocr #$ocrad
                                   #:timeout 60)
             (marionette-type #$(string-append %luks-passphrase "\n")
                              #$marionette)
@@ -999,7 +999,7 @@ launched as a shepherd service."
             ;; XXX: Here we use OCR as well but we could instead use QEMU
             ;; '-serial stdio' and run it in an input pipe,
             (wait-for-screen-text #$marionette passphrase-prompt?
-                                  #:ocrad #$ocrad
+                                  #:ocr #$ocrad
                                   #:timeout 120)
             (marionette-type #$(string-append %luks-passphrase "\n")
                              #$marionette)