[Mesa-dev] [PATCH] meson: Move xvmc test tools from unit tests to installed tools.

Dylan Baker dylan at pnwbakers.com
Thu Jul 12 18:50:21 UTC 2018


Reviewed-by: Dylan Baker <dylan at pnwbakers.com>

Quoting Eric Anholt (2018-07-12 11:44:45)
> These are not unit tests, as they rely on the host's XVMC and some user
> configuration.  Switch them over to being general installed tools, to fix
> unit testing.
> 
> Fixes: 22a817af8a89 ("meson: build gallium xvmc state tracker")
> ---
>  meson.build                                 |  2 +-
>  meson_options.txt                           |  2 +-
>  src/gallium/state_trackers/xvmc/meson.build | 30 +++++++++------------
>  3 files changed, 15 insertions(+), 19 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 7d12af3d5108..e05645cbf39b 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -58,7 +58,7 @@ with_osmesa = get_option('osmesa')
>  with_swr_arches = get_option('swr-arches')
>  with_tools = get_option('tools')
>  if with_tools.contains('all')
> -  with_tools = ['freedreno', 'glsl', 'intel', 'nir', 'nouveau']
> +  with_tools = ['freedreno', 'glsl', 'intel', 'nir', 'nouveau', 'xvmc']
>  endif
>  
>  dri_drivers_path = get_option('dri-drivers-path')
> diff --git a/meson_options.txt b/meson_options.txt
> index 5de73536bf7d..5bb560b61fb0 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -295,7 +295,7 @@ option(
>    'tools',
>    type : 'array',
>    value : [],
> -  choices : ['freedreno', 'glsl', 'intel', 'nir', 'nouveau', 'all'],
> +  choices : ['freedreno', 'glsl', 'intel', 'nir', 'nouveau', 'xvmc', 'all'],
>    description : 'List of tools to build.',
>  )
>  option(
> diff --git a/src/gallium/state_trackers/xvmc/meson.build b/src/gallium/state_trackers/xvmc/meson.build
> index 2c98b0290d99..d120d533eef6 100644
> --- a/src/gallium/state_trackers/xvmc/meson.build
> +++ b/src/gallium/state_trackers/xvmc/meson.build
> @@ -27,31 +27,27 @@ libxvmc_st = static_library(
>  )
>  
>  # These tests will not work without a working xvmc configuration. 
> -if with_tests
> +if with_tools.contains('xvmc')
>    dep_xvmcw = cc.find_library('XvMCW')
>    dep_real_xvmc = dependency('xvmc')
>    foreach x : ['context', 'surface', 'subpicture', 'blocks', 'rendering']
>      _name = 'xvmc_ at 0@'.format(x)
> -    test(
> -      _name,
> -      executable(
> -        _name,
> -        files('tests/test_ at 0@.c'.format(x), 'tests/testlib.c'), 
> -        dependencies : [
> -          dep_real_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_xvmcw,
> -        ],
> -      )
> -    )
> -  endforeach
> -
> -  test(
> -    'xvmc_bench',
>      executable(
> -      'xvmc_bench',
> -      files('tests/xvmc_bench.c', 'tests/testlib.c'), 
> +      _name,
> +      files('tests/test_ at 0@.c'.format(x), 'tests/testlib.c'),
>        dependencies : [
>          dep_real_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_xvmcw,
>        ],
> +      install: true,
>      )
> +  endforeach
> +
> +  executable(
> +    'xvmc_bench',
> +    files('tests/xvmc_bench.c', 'tests/testlib.c'),
> +    dependencies : [
> +      dep_real_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_xvmcw,
> +    ],
> +    install: true,
>    )
>  endif
> -- 
> 2.18.0
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180712/350eafcf/attachment.sig>


More information about the mesa-dev mailing list