From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: "Huacai Chen" <zltjiangshi@gmail.com>,
"Daniel P . Berrange" <berrange@redhat.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
"Cleber Rosa" <crosa@redhat.com>,
"Huacai Chen" <chenhc@lemote.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH 4/6] tests/acceptance: Introduce tesseract_ocr() helper
Date: Mon, 26 Oct 2020 07:09:36 +0100 [thread overview]
Message-ID: <ff6d5b0a-fd01-1f10-a03c-482f0009b030@redhat.com> (raw)
In-Reply-To: <82f65042-abd3-36e0-b384-99dd87298163@amsat.org>
On 24/10/2020 19.40, Philippe Mathieu-Daudé wrote:
> On 10/24/20 9:37 AM, Philippe Mathieu-Daudé wrote:
>> On 10/24/20 8:40 AM, Thomas Huth wrote:
>>> On 24/10/2020 08.35, Thomas Huth wrote:
>>>> On 21/10/2020 12.50, Philippe Mathieu-Daudé wrote:
>>>>> We are going to reuse the tesseract OCR code.
>>>>> Create a new tesseract_ocr() helper and use it.
>>>>>
>>>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>>>> ---
>>>>> tests/acceptance/machine_m68k_nextcube.py | 21 +++++----------------
>>>>> tests/acceptance/tesseract_utils.py | 18 ++++++++++++++++++
>>>>> 2 files changed, 23 insertions(+), 16 deletions(-)
> ...
>
>>>>
>>>> Would it make sense to completely hide the tesseract version handling in
>>>> this new tesseract_utils.py file now, so that the tests themselves do not
>>>> have to worry about this anymore
>
> The problem is the recognized strings differ between versions,
> see in tests/acceptance/machine_m68k_nextcube.py:
>
> lines = tesseract_ocr(screenshot_path, tesseract_version=3)
> text = '\n'.join(lines)
> self.assertIn('Backplane', text)
> self.assertIn('Ethernet address', text)
>
> and:
>
> lines = tesseract_ocr(screenshot_path, tesseract_version=4)
> text = '\n'.join(lines)
> self.assertIn('Testing the FPU, SCC', text)
> self.assertIn('System test failed. Error code', text)
> self.assertIn('Boot command', text)
> self.assertIn('Next>', text)
Ah, right, I forgot about that ... well, one more reason to completely
switch to tesseract v4 now ;-)
Thomas
next prev parent reply other threads:[~2020-10-26 6:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-21 10:50 [PATCH 0/6] tests/acceptance: Test the Fuloong 2E machine Philippe Mathieu-Daudé
2020-10-21 10:50 ` [PATCH 1/6] tests/acceptance: Remove unused import Philippe Mathieu-Daudé
2020-10-24 6:58 ` Thomas Huth
2020-10-21 10:50 ` [PATCH 2/6] tests/acceptance: Use .ppm extention for Portable PixMap files Philippe Mathieu-Daudé
2020-10-24 6:24 ` Thomas Huth
2020-10-21 10:50 ` [PATCH 3/6] tests/acceptance: Extract tesseract_available() helper in new namespace Philippe Mathieu-Daudé
2020-10-24 6:31 ` Thomas Huth
2020-10-21 10:50 ` [PATCH 4/6] tests/acceptance: Introduce tesseract_ocr() helper Philippe Mathieu-Daudé
2020-10-24 6:35 ` Thomas Huth
2020-10-24 6:40 ` Thomas Huth
2020-10-24 7:37 ` Philippe Mathieu-Daudé
2020-10-24 17:40 ` Philippe Mathieu-Daudé
2020-10-26 6:09 ` Thomas Huth [this message]
2020-10-21 10:50 ` [PATCH 5/6] tests/acceptance: Test Linux on the Fuloong 2E machine Philippe Mathieu-Daudé
2020-10-21 10:50 ` [PATCH 6/6] tests/acceptance: Test PMON " Philippe Mathieu-Daudé
2020-10-25 11:18 ` [PATCH 0/6] tests/acceptance: Test " Mark Cave-Ayland
2020-10-25 12:22 ` Philippe Mathieu-Daudé
2020-10-25 14:30 ` BALATON Zoltan via
2020-10-26 8:50 ` Philippe Mathieu-Daudé
2020-10-26 17:20 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ff6d5b0a-fd01-1f10-a03c-482f0009b030@redhat.com \
--to=thuth@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=chenhc@lemote.com \
--cc=crosa@redhat.com \
--cc=f4bug@amsat.org \
--cc=jiaxun.yang@flygoat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
--cc=wainersm@redhat.com \
--cc=zltjiangshi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).