From nobody Fri May 10 20:39:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1561820618; cv=none; d=zoho.com; s=zohoarc; b=jE49raPbcpoznHfZUWu/OtG8vAG4mYeriPkVg76nBSQvnn/MFpnsmlf5zqr6lYD1OSWexg3QiDV9CIMi6uca6pfwubzui+Ne0X5LOCxqGe1ru6N9S1641ou3KoiOvOPo5eoonBAKjHR9WVz5KWJ37+D/xNBh1/DDsaGxWgShNqI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561820618; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=gpp9Udz/jFQYQuXUbwF4OjuIMxDQuVUIk0bf5J+Kovs=; b=Y0kwLYdTzAy14TjBaEHK1+7qg5K6ktpvuQewxWn9yr+iIfUXi3vRWaP0dMCRK3ivsWLtxXo9WJUKZcJo/h2f0poM9XBgazt9lPYtUj9X4y1I89Ppmax5B5blBS8ULAUHdux/M3vyL8uxSZn68UCl9rN+s0FFNyHbzbS2HQewJAY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156182061873170.01997118614827; Sat, 29 Jun 2019 08:03:38 -0700 (PDT) Received: from localhost ([::1]:40918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhEsy-0004np-Nt for importer@patchew.org; Sat, 29 Jun 2019 11:03:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37897) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhEqj-00037C-0B for qemu-devel@nongnu.org; Sat, 29 Jun 2019 11:01:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hhEqh-0007G4-BO for qemu-devel@nongnu.org; Sat, 29 Jun 2019 11:01:08 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:52719) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hhEqf-0007Bd-Ai for qemu-devel@nongnu.org; Sat, 29 Jun 2019 11:01:06 -0400 Received: by mail-wm1-x342.google.com with SMTP id s3so11744905wms.2 for ; Sat, 29 Jun 2019 08:01:02 -0700 (PDT) Received: from x1.local (183.red-88-21-202.staticip.rima-tde.net. [88.21.202.183]) by smtp.gmail.com with ESMTPSA id h19sm5146231wrb.81.2019.06.29.08.00.58 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 29 Jun 2019 08:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gpp9Udz/jFQYQuXUbwF4OjuIMxDQuVUIk0bf5J+Kovs=; b=uPkDFMNnvQ0vTqQ1RZRMBzvZ5kKa1wW8Mn3zLS4odmbsJaRJ9mXweXTNQ1eK01dP8q s9atfzAe8hrA9odLutk8w5YcSrBeOzZQyXJFS0vaW3h+A5kqT5LMQGEWBo2HSHD6cUR9 GrYDrW2SUBFM8tcZ2EldgWEw5gK717Wd1BYGXASNS7lQR1fTWzMvecxaXWDa173AKBcb dnX0D+SsEy4cFORSh8iRe7VvHrsw+snPbVe2ZzVSHbG7iKU05hqQpQlMKjIM7PwgTrIF oCDm2R0Uuv2E1f+C9uOJhP0QAOzsMBTteAJoP9FsC00C0RnkswTstD492WiOxME0UhWs +XKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=gpp9Udz/jFQYQuXUbwF4OjuIMxDQuVUIk0bf5J+Kovs=; b=cE9uEgXhOUUn2nnop7vB9fbQyyJEvcvRQKx2OMnjC/73JplyKCiohIurjV5/2FJdt6 beqgl8b7TZ+74vVJESGhGvH92FRzP7lweTB9+EHIVGTEUCT+ePSVLYGXGTsUoKEbXU7c XDTY9ZUXJU07Z5oLSzcCuezJ8bvQ2ONVPBU70fGWW/LGRmtESK2BvR2QgDYLwwHo5ZYU OHQq9awpO9CFRn1dkm17L6VVPuiF4PrGbCAimDEMYOGcOxFzaCEhljMdw7IHL8AUykuE NQI6WMWHd+X/IRDz9Yqrdg2d4/GD5aLT1GQb4hfMo2/V+Ksk98XAFO6/dS25pVp4+hVo k0+Q== X-Gm-Message-State: APjAAAWEdpL5WKuisD0GhM0xxXdkWuMZtsWGuzVSel005n1/OWgWvd4H Gptrb1WUIN4nOgINDnrO2WZWr5DU X-Google-Smtp-Source: APXvYqypS6qIcngmcEQnpZSo5b0wbCVexxm1XyKXUQVqbAlGsZFXijy3GzVf+Jjcj3SUjVfg2c4lvw== X-Received: by 2002:a1c:b6d4:: with SMTP id g203mr10892189wmf.19.1561820460058; Sat, 29 Jun 2019 08:01:00 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Sat, 29 Jun 2019 17:00:55 +0200 Message-Id: <20190629150056.9071-2-f4bug@amsat.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190629150056.9071-1-f4bug@amsat.org> References: <20190629150056.9071-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 Subject: [Qemu-devel] [PATCH 1/2] tests/acceptance: Add test of NeXTcube framebuffer using OCR X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Gerd Hoffmann , Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Add a test of the NeXTcube framebuffer using the Tesseract OCR engine on a screenshot of the framebuffer device. The test is very quick: $ avocado --show=3Dapp,ocr run tests/acceptance/machine_m68k_nextcube.py JOB ID : f7d3c27976047036dc568183baf64c04863d9985 JOB LOG : ~/avocado/job-results/job-2019-06-29T16.18-f7d3c27/job.log (1/1) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_boot= rom_framebuffer: |ocr: ue r pun Honl'=EF=AC=82x ; 5=E2=80=98 55=E2=80=98 avg ncaaaaa 25 MHZ, memary jag m Backplane slat =C2=ABa Ethernet address a a r a r3 2 Memgry sackets aea canflqured far 16MB Darlly page made stMs but have 16M= B page made stMs )nstalled Memgry sackets a and 1 canflqured far 16MB Darlly page made stMs but have= 16MB page made stMs )nstalled [...] Yestlnq the rpu, 5:: system test raneg Errar egge 51 Egg: cammand Default pggc devlce nut fauna NEXY>I PASS (3.59 s) RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | = CANCEL 0 JOB TIME : 3.97 s Documentation on how to install tesseract: https://github.com/tesseract-ocr/tesseract/wiki#installation Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/machine_m68k_nextcube.py | 50 +++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tests/acceptance/machine_m68k_nextcube.py diff --git a/tests/acceptance/machine_m68k_nextcube.py b/tests/acceptance/m= achine_m68k_nextcube.py new file mode 100644 index 0000000000..cf061292a7 --- /dev/null +++ b/tests/acceptance/machine_m68k_nextcube.py @@ -0,0 +1,50 @@ +# Functional test that boots a VM and run OCR on the framebuffer +# +# Copyright (c) Philippe Mathieu-Daud=C3=A9 +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +import logging +import time +import distutils.spawn + +from avocado import skipUnless +from avocado_qemu import Test +from avocado.utils import process + + +class NextCubeMachine(Test): + + timeout =3D 15 + + @skipUnless(distutils.spawn.find_executable('tesseract'), + 'tesseract OCR tool not installed') + def test_bootrom_framebuffer(self): + """ + :avocado: tags=3Darch:m68k + :avocado: tags=3Dmachine:next-cube + :avocado: tags=3Ddevice:framebuffer + """ + rom_url =3D ('http://www.nextcomputers.org/NeXTfiles/Software/ROM_= Files/' + '68040_Non-Turbo_Chipset/Rev_2.5_v66.BIN') + rom_hash =3D 'b3534796abae238a0111299fc406a9349f7fee24' + rom_path =3D self.fetch_asset(rom_url, asset_hash=3Drom_hash) + + self.vm.set_machine('next-cube') + self.vm.add_args('-bios', rom_path) + self.vm.launch() + + self.log.info('VM launched, waiting for display') + # FIXME how to catch the 'displaysurface_create 1120x832' trace-ev= ent? + time.sleep(2) + + screenshot_path =3D self.workdir + "dump" + self.vm.command('human-monitor-command', + command_line=3D'screendump %s' % screenshot_path) + + console_logger =3D logging.getLogger('ocr') + proc =3D process.run("tesseract %s stdout" % screenshot_path) + console_logger.debug(proc.stdout_text) + self.assertIn('Backplane', proc.stdout_text) + self.assertIn('Ethernet address', proc.stdout_text) --=20 2.19.1 From nobody Fri May 10 20:39:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1561820615; cv=none; d=zoho.com; s=zohoarc; b=jlIpMfyePx8w1psu1zGJlQmxeGh5YyA0ChZ4QmkJrgsYpZvIfx5+ORNNlc/e6B8IUQcws5tJfrk+OFrha7VmlLXG5ouGpoKmkoyR4vx8GUNBl5IG7ObstIMVcmxNxa8XwnPevGZpK6EJJU2aPiEbQU/VuKmYKuSDzyfPRUvQyZk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561820615; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=OBGqUscJCP7fBbgEN2disVg7FXjg+Z9utLTLXFbxMGc=; b=XryJfsesMDuZzA81M1Nk1aLWRB3/pRhz0Da8pQo2kTXoUKeqVhneuMOJK7BOEdfS71OFkOApReCuS/Ef2qJsDqco3f0Iw/5uKDQBr47LTo/34muAIDYux4akWz+5zF5evPbbtwBckZXENR5vmpVHaOSgsONHriVnSbrkpWWzniI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1561820615595390.1604977502135; Sat, 29 Jun 2019 08:03:35 -0700 (PDT) Received: from localhost ([::1]:40920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhEsy-0004nt-HH for importer@patchew.org; Sat, 29 Jun 2019 11:03:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37917) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhEql-00037k-3B for qemu-devel@nongnu.org; Sat, 29 Jun 2019 11:01:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hhEqi-0007HI-UY for qemu-devel@nongnu.org; Sat, 29 Jun 2019 11:01:09 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:44311) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hhEqh-0007Ch-8w for qemu-devel@nongnu.org; Sat, 29 Jun 2019 11:01:07 -0400 Received: by mail-wr1-x442.google.com with SMTP id r16so7309798wrl.11 for ; Sat, 29 Jun 2019 08:01:03 -0700 (PDT) Received: from x1.local (183.red-88-21-202.staticip.rima-tde.net. [88.21.202.183]) by smtp.gmail.com with ESMTPSA id h19sm5146231wrb.81.2019.06.29.08.01.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 29 Jun 2019 08:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OBGqUscJCP7fBbgEN2disVg7FXjg+Z9utLTLXFbxMGc=; b=g8suKO7Y/ReaSKnJL14Swf/K2VMWSzRvneZ+Lw96x8HvDg16WMnJ99MA0vd0HUqiBX 5XftG/5XGTQPHBfu4oNPBDQwV+ry7MWhNGN1pscjbEbjXjpQTKARMMLtoMnW4KQw01HV aol08uejqMT/sdxr8UiUlx9gLYNanmOUdunpWMxkRTO7z1xE12bL/F7y/0bAJBvrht3n ax9COnJzkR6p3GxXkQTDWKMJBuBu6lqEPqjw/kE8qsGFnn29N/KamYkIU+8xIvHdWi5s 626D3S0nmvzwv7BKuCtdyBSVkKK4eD4Rshhi7Lwpim2e4JAgTNevnBJTLvReOkADX9Lq xOvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=OBGqUscJCP7fBbgEN2disVg7FXjg+Z9utLTLXFbxMGc=; b=PwvNNAauHT4DQJjkM1CdFxv5BruP8qSWpyvyhPuADRLb2MX1pWoKafTVQQ4aaIHWkI XUZZz4aPWI+FS2p//Ue0y0nS7O5wpp/j6ykg763pG4/VLZAiieB5H/hChCt5XKfUxXht lcAYMpMJdIegHAsYGpaGhOiNcYWdJ07FfL/aAOvx8vj94aOykM6DZI84zZiqO4wKMOob 2jLtW/CmniY+ZVJtxrL+gRpRvoVQowmsDsPMuU0sqGOJT58oZC+iH4V3myCRL6ffdsr9 OYeGphyhZcF9+DtI/DMdcvEFlimGFtvkT9HauPn/Xh5pIdk4MLXNKPxo18sIfED+GxKJ 5rgA== X-Gm-Message-State: APjAAAUV45JxIkU4K9PN+Oe3DnTSQVdgdB7R332IcxjJ0J6rT3I94x9v tEY2xXZT3aCRK5OIfOn2H0xbxONH X-Google-Smtp-Source: APXvYqyKpekdoc4VrYTBqfH38sA7QKr+X4okgFLqYN6Z4LTHiA/8o/d/JTfyYHpBi+JdEMZBBATXyg== X-Received: by 2002:adf:fdc2:: with SMTP id i2mr11870158wrs.146.1561820462031; Sat, 29 Jun 2019 08:01:02 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Sat, 29 Jun 2019 17:00:56 +0200 Message-Id: <20190629150056.9071-3-f4bug@amsat.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190629150056.9071-1-f4bug@amsat.org> References: <20190629150056.9071-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH 2/2] .travis.yml: Let the avocado job run the NeXTcube tests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Gerd Hoffmann , Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index aeb9b211cd..16907b5a78 100644 --- a/.travis.yml +++ b/.travis.yml @@ -231,7 +231,7 @@ matrix: =20 # Acceptance (Functional) tests - env: - - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmm= u,alpha-softmmu" + - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmm= u,alpha-softmmu,m68k-softmmu" - TEST_CMD=3D"make check-acceptance" after_failure: - cat tests/results/latest/job.log @@ -240,6 +240,9 @@ matrix: packages: - python3-pip - python3.5-venv + - tesseract-ocr + + # Using newer GCC with sanitizers - addons: apt: --=20 2.19.1