diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-11-23 13:56:42 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-11-23 21:13:18 +0100 |
commit | fe933833504c90eb40b0d2c71847675b31c142b4 (patch) | |
tree | 4b776d6adea59fd6aa68391b80058abc2a997d9c /gnu/tests/base.scm | |
parent | f25c9ebc805565ae517c87c6b904bde0661bee46 (diff) | |
download | guix-fe933833504c90eb40b0d2c71847675b31c142b4.tar guix-fe933833504c90eb40b0d2c71847675b31c142b4.tar.gz |
marionette: Add 'marionette-screen-text' using OCR.
* gnu/build/marionette.scm (marionette-screen-text): New procedure.
* gnu/tests/base.scm (run-basic-test)["screen text"]: New test.
Diffstat (limited to 'gnu/tests/base.scm')
-rw-r--r-- | gnu/tests/base.scm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index 9a265309c0..3be1c55b41 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -31,6 +31,8 @@ #:use-module (gnu services mcron) #:use-module (gnu services shepherd) #:use-module (gnu services networking) + #:use-module (gnu packages imagemagick) + #:use-module (gnu packages ocr) #:use-module (guix gexp) #:use-module (guix store) #:use-module (guix monads) @@ -241,6 +243,20 @@ info --version") marionette) (file-exists? "tty1.ppm"))) + (test-assert "screen text" + (let ((text (marionette-screen-text marionette + #:ocrad + #$(file-append ocrad + "/bin/ocrad")))) + ;; Check whether the welcome message and shell prompt are + ;; displayed. Note: OCR confuses "y" and "V" for instance, so + ;; we cannot reliably match the whole text. + (and (string-contains text "This is the GNU") + (string-contains text + (string-append + "root@" + #$(operating-system-host-name os)))))) + (test-end) (exit (= (test-runner-fail-count (test-runner-current)) 0))))) |