[libcamera-devel] [PATCH 3/3] test: list-cameras: skip if no camera is available

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Jul 27 01:58:30 CEST 2020


Hi You-Sheng,

Thank you for the patch.

On Sat, Jul 25, 2020 at 08:24:42PM +0800, You-Sheng Yang wrote:
> Signed-off-by: You-Sheng Yang <vicamo.yang at canonical.com>
> ---
>  test/list-cameras.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/test/list-cameras.cpp b/test/list-cameras.cpp
> index e6a407a..f4cd3b7 100644
> --- a/test/list-cameras.cpp
> +++ b/test/list-cameras.cpp
> @@ -26,7 +26,7 @@ protected:
>  			return TestFail;
>  		}
>  
> -		return 0;
> +		return cm_->cameras().size() ? TestPass : TestSkip;

I think this test should instead be dropped completely. It's the first
test case we've added, in order to start development of the unit tests,
and it doesn't serve much purpose anymore as we have a bunch of other
tests that exercise the same API, and more.

>  	}
>  
>  	int run()

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list