All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	 Aleksandar Markovic <aleksandar.markovic@rt-rk.com>,
	Cleber Rosa <crosa@redhat.com>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Aleksandar Markovic" <amarkovic@wavecomp.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
Date: Tue, 3 Mar 2020 13:55:35 +0100	[thread overview]
Message-ID: <CAP+75-WyFM7jKmBxiti5PMSJskmztQ7RLrTK72aW9LiLAWh+cw@mail.gmail.com> (raw)
In-Reply-To: <741a03d4-4aa0-4782-771b-98468042c060@redhat.com>

Hi Cleber,

 On Tue, Mar 3, 2020 at 12:40 AM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
> On 3/2/20 9:58 PM, Aleksandar Markovic wrote:
> >> From: Peter Maydell <peter.maydell@linaro.org>
> >> Sent: Monday, March 2, 2020 9:26 PM
> >> To: Aleksandar Markovic
> >> Cc: QEMU Developers; Aleksandar Markovic; Philippe Mathieu-Daudé
> >> Subject: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
> >>
> >> On Thu, 27 Feb 2020 at 13:28, Aleksandar Markovic
> >> <aleksandar.markovic@rt-rk.com> wrote:
> >>>
> >>> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
> >>>
> >>> Add a test that verifies that each core properly displays the Tux
> >>> logo on the framebuffer device.
> >>>
> >>> We simply follow the OpenCV "Template Matching with Multiple Objects"
> >>> tutorial, replacing Lionel Messi by Tux:
> >>> https://docs.opencv.org/4.2.0/d4/dc6/tutorial_py_template_matching.html
> >>
> >> Hi -- this doesn't seem to work on my system:
> >>
> >
> > Thank you for bringing this to our attention.
> >
> > It looks like an honest mistake to me. Too bad
> > none of us tested the case of environment like
> > yours, even though it looked reasonable to test it.
>
> I'm sorry I missed that, I'm pretty sure I tested it as we noticed this
> "bug" in Avocado more than 1 year ago already (bug = class decorator not
> working).

I see in commit 2fe6f4d9ba you moved the @skip decorators to the setUp() method.
Is this a kind of kludge to not use it on all the test_*() methods?
(since we can not use it on an AvocadoTest class)

> I suppose I forgot to test that on Travis-CI and all my
> systems have opencv2 installed.
>
> >
> > Philippe, Peter's solution looks good to me. What
> > do you think?
>
> Yes this is correct. Alex suggested it earlier and I resend his patch
> fixed which is exactly the diff Peter pasted (I am just noticing it now):
> https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg00389.html
>
> >
> > Peter, would you like me to submit a patch with your
> > proposal, authored by you, and than soon send it as
> > a part of a small pull request?
> >
> > Thanks again,
> > Aleksandar
> >
> >>   (38/74) tests/acceptance/machine_arm_integratorcp.py:IntegratorMachine.test_integratorcp_console:
> >> SKIP: untrusted code
> >>   (39/74) tests/acceptance/machine_arm_integratorcp.py:IntegratorMachine.test_framebuffer_tux_logo:
> >> SKIP: Python NumPy not installed
> >>   (40/74) tests/acceptance/machine_arm_n8x0.py:N8x0Machine.test_n800:
> >> SKIP: untrusted code
> >>   (41/74) tests/acceptance/machine_arm_n8x0.py:N8x0Machine.test_n810:
> >> SKIP: untrusted code
> >>   (42/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_size:
> >> PASS (3.47 s)
> >>   (43/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_ocr_with_tesseract_v3:
> >> SKIP: tesseract v3 OCR tool not available
> >>   (44/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_ocr_with_tesseract_v4:
> >> SKIP: tesseract v4 OCR tool not available
> >>   (45/74) tests/acceptance/machine_mips_malta.py:MaltaMachineFramebuffer.test_mips_malta_i6400_framebuffer_logo_1core:
> >> ERROR: name 'cv2' is not defined (5.43 s)
> >>
> >> It looks like the @skipUnless directive on the class didn't
> >> have any effect. Moving it to the individual test functions seems
> >> to cause them to be skipped as intended (as the integratorcp
> >> framebuffer test is):
> >>
> >> diff --git a/tests/acceptance/machine_mips_malta.py
> >> b/tests/acceptance/machine_mips_malta.py
> >> index 92b4f28a112..98463f77573 100644
> >> --- a/tests/acceptance/machine_mips_malta.py
> >> +++ b/tests/acceptance/machine_mips_malta.py
> >> @@ -30,8 +30,6 @@ except ImportError:
> >>       CV2_AVAILABLE = False
> >>
> >>
> >> -@skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> >> -@skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
> >>   class MaltaMachineFramebuffer(Test):
> >>
> >>       timeout = 30
> >> @@ -91,6 +89,8 @@ class MaltaMachineFramebuffer(Test):
> >>               cv2.imwrite(debug_png, screendump_bgr)
> >>           self.assertGreaterEqual(tuxlogo_count, cpu_cores_count)
> >>
> >> +    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> >> +    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
> >>       def test_mips_malta_i6400_framebuffer_logo_1core(self):
> >>           """
> >>           :avocado: tags=arch:mips64el
> >> @@ -99,6 +99,8 @@ class MaltaMachineFramebuffer(Test):
> >>           """
> >>           self.do_test_i6400_framebuffer_logo(1)
> >>
> >> +    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> >> +    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
> >>       def test_mips_malta_i6400_framebuffer_logo_7cores(self):
> >>           """
> >>           :avocado: tags=arch:mips64el
> >> @@ -108,6 +110,8 @@ class MaltaMachineFramebuffer(Test):
> >>           """
> >>           self.do_test_i6400_framebuffer_logo(7)
> >>
> >> +    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> >> +    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
> >>       def test_mips_malta_i6400_framebuffer_logo_8cores(self):
> >>           """
> >>           :avocado: tags=arch:mips64el
> >>
> >> thanks
> >> -- PMM
> >
> >



  reply	other threads:[~2020-03-03 12:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 13:27 [PULL 0/5] MIPS queue for February 27th, 2020 Aleksandar Markovic
2020-02-27 13:27 ` [PULL 1/5] MAINTAINERS: Orphan MIPS KVM CPUs Aleksandar Markovic
2020-02-27 13:27 ` [PULL 2/5] MAINTAINERS: Reactivate " Aleksandar Markovic
2020-02-27 13:27 ` [PULL 3/5] hw/mips/mips_int: Simplify cpu_mips_irq_init_cpu() Aleksandar Markovic
2020-02-27 13:27 ` [PULL 4/5] hw/mips: Use memory_region_init_rom() with read-only regions Aleksandar Markovic
2020-02-27 13:27 ` [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer Aleksandar Markovic
2020-03-02 20:26   ` Peter Maydell
2020-03-02 20:58     ` [EXTERNAL]Re: " Aleksandar Markovic
2020-03-02 21:20       ` Aleksandar Markovic
2020-03-02 23:40       ` Philippe Mathieu-Daudé
2020-03-03 12:55         ` Philippe Mathieu-Daudé [this message]
2020-03-03 14:29           ` Cleber Rosa
2020-02-28 14:02 ` [PULL 0/5] MIPS queue for February 27th, 2020 Peter Maydell

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=CAP+75-WyFM7jKmBxiti5PMSJskmztQ7RLrTK72aW9LiLAWh+cw@mail.gmail.com \
    --to=philmd@redhat.com \
    --cc=aleksandar.markovic@rt-rk.com \
    --cc=alex.bennee@linaro.org \
    --cc=amarkovic@wavecomp.com \
    --cc=crosa@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.