[libcamera-devel] Usage of test folder

Kieran Bingham kieran.bingham at ideasonboard.com
Mon Jun 15 15:49:33 CEST 2020


Hi,


On 15/06/2020 14:45, naidu nama wrote:
> Hi,
> Got it. I am able to run ninja test.
> My concern is where does the results store??(not testlog.txt)
> 
> If i run executable(./capture).where does the image store??


There are no images stored by the test binaries.

It sounds like you are expecting to run the test-utilitys such as 'cam'
or 'qcam'.

You can find those under:

 ./build/src/cam/cam

and

 ./build/src/qcam/qcam

If you have a graphical window environment, try running qcam first to
see if it presents any images.

Or check to see if any cameras are available to libcamera using:

 ./build/src/cam/cam -l

On my system this produces:

> libcamera$ ./build/src/cam/cam -l
> [33:14:01.618700292] [582376]  INFO IPAManager ipa_manager.cpp:136 libcamera is not installed. Adding '/home/linuxembedded/iob/libcamera/libcamera/build/src/ipa' to the IPA search path
> [33:14:01.637553459] [582376]  INFO Camera camera_manager.cpp:280 libcamera v0.0.11+577-8f41ef1d
> Available cameras:
> 1: HP Wide Vision FHD Camera: HP W
> 2: HP Wide Vision FHD Camera: HP I


>From there, you'll find more instructions by adding the '-h' flag to cam.

--
Kieran


> 
> Thanks,
> naidu.
> 
> On Mon, Jun 15, 2020 at 7:05 PM Kieran Bingham
> <kieran.bingham at ideasonboard.com> wrote:
>>
>> Hi,
>>
>> On 15/06/2020 13:59, naidu nama wrote:
>>> Hi,
>>> root at IM-RT-LP-444:/home/vnama/camera/libcamera/build# ninja test
>>> [2/95] Generating version.cpp with a custom command
>>> FAILED: src/libcamera/version.cpp
>>> /home/vnama/.local/bin/meson --internal vcstagger
>>> ../src/libcamera/version.cpp.in src/libcamera/version.cpp 0.0.0
>>> /home/vnama/camera/libcamera/src/libcamera @VCS_TAG@ '(.*)'
>>> /home/vnama/camera/libcamera/utils/gen-version.sh
>>> /home/vnama/camera/libcamera/build
>>> Traceback (most recent call last):
>>>   File "/home/vnama/.local/bin/meson", line 7, in <module>
>>>     from mesonbuild.mesonmain import main
>>> ModuleNotFoundError: No module named 'mesonbuild'
>>
>> This looks like you do not have meson correctly installed somehow, or
>> perhaps an unsupported version?
>>
>> Looking at the location in ~/.local/bin/meson - I assume you have
>> installed it with pip.
>>
>> Perhaps try the following:
>>
>>   pip3 install meson --upgrade
>>
>>
>> Or if you are running python2:
>>
>>   pip install meson --upgrade
>>
>>
>>
>> Otherwise I would suggest you remove the build directory and try a clean
>> build from scratch as the simplest next step.
>>
>>
>> --
>> Kieran
>>
>>
>>> [7/95] Compiling C++ object
>>> 'test/ipa/6f17ff3@@ipa_wrappers_test at exe/ipa_wrappers_test.cpp.o'
>>> ninja: build stopped: subcommand failed.
>>>
>>> No, the executable files are located in
>>> $build/test/ not in the top-level directory test/ where the source
>>> ->I am asking where the capture images are stored not about the executable.
>>>
>>> On Mon, Jun 15, 2020 at 6:26 PM Jacopo Mondi <jacopo at jmondi.org> wrote:
>>>>
>>>>
>>>>
>>>> On Mon, Jun 15, 2020 at 06:20:07PM +0530, naidu nama wrote:
>>>>> Hi team,
>>>>> I am not able to run the command ninja test
>>>>> root at IM-RT-LP-444:/home/vnama/camera/libcamera# ninja test
>>>>> ninja: error: loading 'build.ninja': No such file or directory
>>>>
>>>> All ninja invocations shall be run from your build directory.
>>>>
>>>>>
>>>>> And where does the test results will store(eg:under
>>>>> test/camera->./capture(executable is there).where does this result
>>>>> store).
>>>>
>>>> No, the executable files are located in
>>>> $build/test/ not in the top-level directory test/ where the source
>>>> files are.
>>>>
>>>> Please have a look at the meson build system documentation. This is
>>>> nothing libcamera specific.
>>>>
>>>> Thanks
>>>>   j
>>>>
>>>>>
>>>>> Thanks,
>>>>> naidu.
>>>>>
>>>>> On Mon, Jun 15, 2020 at 1:06 PM Jacopo Mondi <jacopo at jmondi.org> wrote:
>>>>>>
>>>>>> Hi Naidu,
>>>>>>
>>>>>> On Mon, Jun 15, 2020 at 12:42:40PM +0530, naidu nama wrote:
>>>>>>> Hi team,
>>>>>>> I am able to run the libcamera using gstreamer plugin
>>>>>>> but I want to know the usage of test folder under libcamera directory
>>>>>>
>>>>>> I am not sure to fully understand your question, are you wondering how
>>>>>> to run tests ?
>>>>>>
>>>>>> The test/ directory contains unit tests, roughly divided into
>>>>>> categories (camera, controls, etc..)
>>>>>>
>>>>>> Tests can be run indivdually as they're exectutables, but they are
>>>>>> mainly run through the meson unit test system
>>>>>> https://mesonbuild.com/Unit-tests.html
>>>>>>
>>>>>> You can simply run 'ninja test' and have all of them executed by the
>>>>>> meson build system.
>>>>>>
>>>>>> Thanks
>>>>>>   j
>>>>>>> _______________________________________________
>>>>>>> libcamera-devel mailing list
>>>>>>> libcamera-devel at lists.libcamera.org
>>>>>>> https://lists.libcamera.org/listinfo/libcamera-devel
>>> _______________________________________________
>>> libcamera-devel mailing list
>>> libcamera-devel at lists.libcamera.org
>>> https://lists.libcamera.org/listinfo/libcamera-devel
>>>
>>
>> --
>> Regards
>> --
>> Kieran

-- 
Regards
--
Kieran


More information about the libcamera-devel mailing list