[libcamera-devel] [RFC v3 5/5] py: Add cam.py
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Thu Dec 9 20:30:00 CET 2021
On Thu, Dec 09, 2021 at 10:15:15AM +0000, Kieran Bingham wrote:
> Quoting Tomi Valkeinen (2021-12-09 10:08:20)
> > On 09/12/2021 12:03, Kieran Bingham wrote:
> >
> > > I'd quite like to see something (anything?) that counts as a unittest
> > > integrated into /test/py/ that somehow validates the APIs that are
> > > created.
> > >
> > > Even if it's only basic for now to construct a camera, or something, so
> > > that when built/enabled, the python code can be linked into the test
> > > framework with 'ninja -C build test'.
> >
> > I've got this:
> >
> > https://github.com/tomba/libcamera/blob/py/src/py/test/unittests.py
> >
> > I probably could have added it in the series.
> >
> > How do you test libcamera with unittests? With vimc?
>
> Precisely ;-)
>
> https://github.com/tomba/libcamera/blob/py/test/camera/capture.cpp#L28
>
> And it's perfectly valid to return that a test is Skipped if it can't
> find a camera device (if it expected to need one).
>
> The unit tests are defined as needing the following to run I believe:
> modprobe vimc
> modprobe vim2m
We also depend on vivid.
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list