[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests/acceptance: move @skipUnless decoration to test itself
From: |
Cleber Rosa |
Subject: |
Re: [PATCH] tests/acceptance: move @skipUnless decoration to test itself |
Date: |
Tue, 3 Mar 2020 09:10:09 -0500 (EST) |
----- Original Message -----
> From: "Alex Bennée" <address@hidden>
> To: "Cleber Rosa" <address@hidden>
> Cc: "Philippe Mathieu-Daudé" <address@hidden>, address@hidden, "Aurelien
> Jarno" <address@hidden>,
> address@hidden, "Aleksandar Markovic" <address@hidden>
> Sent: Tuesday, March 3, 2020 8:59:47 AM
> Subject: Re: [PATCH] tests/acceptance: move @skipUnless decoration to test
> itself
>
>
> Cleber Rosa <address@hidden> writes:
>
> > ----- Original Message -----
> >> From: "Philippe Mathieu-Daudé" <address@hidden>
> >> To: "Alex Bennée" <address@hidden>, address@hidden
> >> Cc: "Aurelien Jarno" <address@hidden>, address@hidden, "Aleksandar
> >> Markovic" <address@hidden>
> >> Sent: Monday, March 2, 2020 1:14:31 PM
> >> Subject: Re: [PATCH] tests/acceptance: move @skipUnless decoration to test
> >> itself
> >>
> >> On 3/2/20 7:09 PM, Alex Bennée wrote:
> >> > It appears ignore the decoration if just applied to the class.
> >>
> >> Odd I remember testing this, this might be a feature supported by a
> >> newer Avocado version than the one available on Travis-CI.
> >>
> >> >
> >> > Signed-off-by: Alex Bennée <address@hidden>
> >> > ---
> >> > tests/acceptance/machine_mips_malta.py | 4 ++--
> >> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >> >
> >> > diff --git a/tests/acceptance/machine_mips_malta.py
> >> > b/tests/acceptance/machine_mips_malta.py
> >> > index 92b4f28a112..b8fac2a44d5 100644
> >> > --- a/tests/acceptance/machine_mips_malta.py
> >> > +++ b/tests/acceptance/machine_mips_malta.py
> >> > @@ -30,14 +30,14 @@ except ImportError:
> >> > CV2_AVAILABLE = False
> >> >
> >> >
> >> > -@skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> >> > -@skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
> >> > class MaltaMachineFramebuffer(Test):
> >> >
> >> > timeout = 30
> >> >
> >> > KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 '
> >> >
> >> > + @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> >> > + @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
> >> > def do_test_i6400_framebuffer_logo(self, cpu_cores_count):
> >> > """
> >> > Boot Linux kernel and check Tux logo is displayed on the
> >> > framebuffer.
> >> >
> >>
> >> Unfortunately you have to also add it to the 7/8cores tests.
> >>
> >>
> >>
> >
> > This is true of Avocado < 76.0, but on 76.0 you can decorate the
> > class too:
> >
> > https://avocado-framework.readthedocs.io/en/76.0/releases/76_0.html#users-test-writers
> >
> > Maybe replace this patch and bump Avocado's version?
>
> Where is this defined in the source?
>
It's defined at tests/requirements.txt.
- Cleber.
> >
> > - Cleber.
>
>
> --
> Alex Bennée
>
>