[Qemu-devel] [PATCH v3 0/3] tests/acceptance: Add test of NeXTcube framebuffer using OCR

Philippe Mathieu-Daudé posted 3 patches 1 week ago
Test FreeBSD passed
Test docker-mingw@fedora passed
Test asan passed
Test s390x failed
Test docker-clang@ubuntu passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190813134921.30602-1-philmd@redhat.com
Maintainers: "Philippe Mathieu-Daudé" <philmd@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Fam Zheng <fam@euphon.net>
.travis.yml                               |   7 +-
tests/acceptance/machine_m68k_nextcube.py | 170 ++++++++++++++++++++++
tests/requirements.txt                    |   1 +
3 files changed, 177 insertions(+), 1 deletion(-)
create mode 100644 tests/acceptance/machine_m68k_nextcube.py

[Qemu-devel] [PATCH v3 0/3] tests/acceptance: Add test of NeXTcube framebuffer using OCR

Posted by Philippe Mathieu-Daudé 1 week ago
Hi,

I was looking at Thomas' last series [*] where he adds the
NeXTcube machine, thinking about enforcing a new rule "new
machines must have tests". Then I realized the UART is not
emitting characters, so our current sample tests are not
helpful.

Since the framebuffer is working, I gave a try at dumping the
screen content via the HMP 'screendump' command, then parsing
the screenshot with an OCR tool.

The default ROM dump the bootlog to a console. Using the old
good tesseract tool we can recover some useful words to be
sure the guest is sane, its framebuffer is definitively working.

This test takes less than 6s on Travis-CI:
https://travis-ci.org/philmd/qemu/builds/552174983#L1836

   AVOCADO tests/acceptance
 (3/9) /home/travis/build/philmd/qemu/tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer:  PASS (5.69 s)

Since v2: https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg00249.html
- addressed Thomas and Cleber review comments (detailed in each patch)
- add RFC to interract sending VNC keys

Since v1: https://lists.gnu.org/archive/html/qemu-devel/2019-06/msg06514.html
- use the English dictionary (Thomas)
- support tesseract v3 and v4 (much better results with v4, but not
  all distros provide it)
- add a test of the framebuffer width/height

Regards,

Phil.

Based-on: 20190709073222.26370-1-huth@tuxfamily.org
[*] "m68k: Add basic support for the NeXTcube machine"
https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg02152.html

Philippe Mathieu-Daudé (3):
  tests/acceptance: Add test of NeXTcube framebuffer using OCR
  tests/acceptance: Run commands sending VNC keys
  .travis.yml: Let the avocado job run the NeXTcube tests

 .travis.yml                               |   7 +-
 tests/acceptance/machine_m68k_nextcube.py | 170 ++++++++++++++++++++++
 tests/requirements.txt                    |   1 +
 3 files changed, 177 insertions(+), 1 deletion(-)
 create mode 100644 tests/acceptance/machine_m68k_nextcube.py

-- 
2.20.1