[libcamera-devel,RFC,07/11,HACK] tests: disable media_device_link_test

Message ID 20190414013506.10515-8-niklas.soderlund@ragnatech.se
State Superseded
Headers show
Series
  • libcamerea: Add support for exclusive access to cameras between processes
Related show

Commit Message

Niklas Söderlund April 14, 2019, 1:35 a.m. UTC
The test depends on the ability to access acquire() and release() of
MediaDevice. These members are about to be made private and will no
longer be cacheable to the test.

This needs to be solved as the test suite needs to be able to unit test
classes properly. But for the purpose of this RFC lets disable it while
it's figured out how to solve it.

Not-Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
 test/media_device/meson.build | 1 -
 1 file changed, 1 deletion(-)

Comments

Laurent Pinchart April 17, 2019, 10:50 a.m. UTC | #1
Hi Niklas,

Thank you for the patch.

On Sun, Apr 14, 2019 at 03:35:02AM +0200, Niklas Söderlund wrote:
> The test depends on the ability to access acquire() and release() of
> MediaDevice. These members are about to be made private and will no
> longer be cacheable to the test.
> 
> This needs to be solved as the test suite needs to be able to unit test
> classes properly. But for the purpose of this RFC lets disable it while
> it's figured out how to solve it.

As previously discussed, I think we can make test classes friends of the
implementation they test, probably with a LIBCAMERA_TEST_FRIEND() or
similar macro to only enable this behaviour when compiling tests.

> Not-Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
> ---
>  test/media_device/meson.build | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/test/media_device/meson.build b/test/media_device/meson.build
> index d91a022fab190abf..e4bedb79b572d655 100644
> --- a/test/media_device/meson.build
> +++ b/test/media_device/meson.build
> @@ -1,6 +1,5 @@
>  media_device_tests = [
>      ['media_device_print_test',         'media_device_print_test.cpp'],
> -    ['media_device_link_test',          'media_device_link_test.cpp'],
>  ]
>  
>  foreach t : media_device_tests

Patch

diff --git a/test/media_device/meson.build b/test/media_device/meson.build
index d91a022fab190abf..e4bedb79b572d655 100644
--- a/test/media_device/meson.build
+++ b/test/media_device/meson.build
@@ -1,6 +1,5 @@ 
 media_device_tests = [
     ['media_device_print_test',         'media_device_print_test.cpp'],
-    ['media_device_link_test',          'media_device_link_test.cpp'],
 ]
 
 foreach t : media_device_tests