[libcamera-devel] [PATCH v5 2/3] py: add unittests.py

Kieran Bingham kieran.bingham at ideasonboard.com
Tue Mar 15 12:47:48 CET 2022


Quoting Tomi Valkeinen (2022-03-15 06:09:20)
> On 14/03/2022 18:21, Kieran Bingham wrote:
> > Hi Tomi,
> > 
> > Quoting Tomi Valkeinen (2022-03-14 15:46:32)
> >> Add a simple unittests.py as a base for python unittests.
> >>
> >> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ideasonboard.com>
> >> ---
> >>   src/py/test/unittests.py | 364 +++++++++++++++++++++++++++++++++++++++
> > 
> > Is it feasible to get this to run/integrate with the meson.build test hooks?
> > 
> > It might want to be under test/python/ perhaps then too.
> 
> Yes, seems to work fine.
> 
> Any preference on the test suite name & test name?
> 

Not specifically, suite name is likely python, and test name - well you
only have one at the moment, which seems to contain multiple tests.
Meson can parse TAP to get the results of each test if you expose it -
but I haven't explored enough there yet.

So for now - just the single pass/fail/skip is likely enough.

(If python is not enabled, then I think the test/python/meson.build
should skip the dir and not test anything).

--
Kieran



>   Tomi


More information about the libcamera-devel mailing list