mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
meson: Add tests to suites
Meson test has a concepts of suites, which allow tests to be grouped together. This allows for a subtest of tests to be run only (say only the tests for nir). A test can be added to more than one suite, but for the most part I've only added a test to a single suite, though I've added a compiler group that includes nir, glsl, and glcpp tests. To use this you'll need to invoke meson test directly, instead of ninja test (which always runs all targets). it can be invoked as: `meson test -C builddir --suite $suitename` (meson test has addition options that are pretty useful). Tested-By: Gert Wollny <gert.wollny@collabora.com> Acked-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
parent
b787dcf57b
commit
a999798daa
24 changed files with 70 additions and 33 deletions
|
|
@ -41,5 +41,6 @@ test(
|
|||
'qpu_disasm', 'tests/qpu_disasm.c',
|
||||
link_with: [libbroadcom_qpu, libmesa_util],
|
||||
include_directories: inc_common
|
||||
)
|
||||
),
|
||||
suite : ['broadcom'],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ if with_any_opengl and with_tests
|
|||
glcpp, join_paths(meson.current_source_dir(), 'tests'),
|
||||
'--@0@'.format(m),
|
||||
],
|
||||
suite : ['compiler', 'glcpp'],
|
||||
)
|
||||
endforeach
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ test(
|
|||
c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
|
||||
include_directories : [inc_common, inc_compiler],
|
||||
link_with : [libglsl],
|
||||
)
|
||||
),
|
||||
suite : ['compiler', 'glsl'],
|
||||
)
|
||||
|
||||
test(
|
||||
|
|
@ -38,7 +39,8 @@ test(
|
|||
include_directories : [inc_common, inc_glsl],
|
||||
link_with : [libglsl],
|
||||
dependencies : [dep_clock, dep_thread],
|
||||
)
|
||||
),
|
||||
suite : ['compiler', 'glsl'],
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -54,7 +56,8 @@ test(
|
|||
include_directories : [inc_common, inc_glsl],
|
||||
link_with : [libglsl, libglsl_standalone, libglsl_util],
|
||||
dependencies : [dep_clock, dep_thread, idep_gtest],
|
||||
)
|
||||
),
|
||||
suite : ['compiler', 'glsl'],
|
||||
)
|
||||
|
||||
test(
|
||||
|
|
@ -68,7 +71,8 @@ test(
|
|||
include_directories : [inc_common, inc_glsl],
|
||||
link_with : [libglsl, libglsl_util],
|
||||
dependencies : [dep_thread, idep_gtest],
|
||||
)
|
||||
),
|
||||
suite : ['compiler', 'glsl'],
|
||||
)
|
||||
|
||||
test(
|
||||
|
|
@ -80,7 +84,8 @@ test(
|
|||
include_directories : [inc_common, inc_glsl],
|
||||
link_with : [libglsl, libglsl_util],
|
||||
dependencies : [dep_thread, idep_gtest],
|
||||
)
|
||||
),
|
||||
suite : ['compiler', 'glsl'],
|
||||
)
|
||||
|
||||
test(
|
||||
|
|
@ -93,7 +98,9 @@ test(
|
|||
meson.source_root(), 'src', 'compiler', 'glsl', 'tests', 'warnings'
|
||||
),
|
||||
],
|
||||
suite : ['compiler', 'glsl'],
|
||||
)
|
||||
|
||||
test(
|
||||
'glsl optimization',
|
||||
prog_python,
|
||||
|
|
@ -101,4 +108,5 @@ test(
|
|||
join_paths(meson.current_source_dir(), 'optimization_test.py'),
|
||||
'--test-runner', glsl_test
|
||||
],
|
||||
suite : ['compiler', 'glsl'],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -246,8 +246,10 @@ if with_tests
|
|||
include_directories : [inc_common],
|
||||
dependencies : [dep_thread, idep_gtest, idep_nir],
|
||||
link_with : libmesa_util,
|
||||
)
|
||||
),
|
||||
suite : ['compiler', 'nir'],
|
||||
)
|
||||
|
||||
test(
|
||||
'nir_vars',
|
||||
executable(
|
||||
|
|
@ -257,6 +259,7 @@ if with_tests
|
|||
include_directories : [inc_common],
|
||||
dependencies : [dep_thread, idep_gtest, idep_nir],
|
||||
link_with : libmesa_util,
|
||||
)
|
||||
),
|
||||
suite : ['compiler', 'nir'],
|
||||
)
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -200,11 +200,13 @@ if with_tests
|
|||
test('egl-symbols-check',
|
||||
find_program('egl-symbols-check'),
|
||||
env : env_test,
|
||||
args : libegl
|
||||
args : libegl,
|
||||
suite : ['egl'],
|
||||
)
|
||||
endif
|
||||
test('egl-entrypoint-check',
|
||||
find_program('egl-entrypoint-check'),
|
||||
env : [ 'srcdir=' + meson.current_source_dir() ]
|
||||
env : ['srcdir=' + meson.current_source_dir()],
|
||||
suite : ['egl'],
|
||||
)
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -119,7 +119,8 @@ if with_tests and with_gallium_softpipe and with_llvm
|
|||
dependencies : [dep_llvm, dep_dl, dep_thread, dep_clock],
|
||||
include_directories : [inc_gallium, inc_gallium_aux, inc_include, inc_src],
|
||||
link_with : [libllvmpipe, libgallium, libmesa_util],
|
||||
)
|
||||
),
|
||||
suite : ['llvmpipe'],
|
||||
)
|
||||
endforeach
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -158,6 +158,7 @@ if with_tests
|
|||
],
|
||||
link_with : [libr300, libgallium, libmesa_util],
|
||||
dependencies : [dep_m, dep_clock, dep_dl, dep_thread, dep_unwind],
|
||||
)
|
||||
),
|
||||
suite : ['r300'],
|
||||
)
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ if with_tests
|
|||
'gbm-symbols-check',
|
||||
find_program('gbm-symbols-check'),
|
||||
env : env_test,
|
||||
args : libgbm
|
||||
args : libgbm,
|
||||
suite : ['gbm'],
|
||||
)
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ if with_shared_glapi
|
|||
include_directories('..'),
|
||||
],
|
||||
dependencies : [dep_libdrm, dep_thread, idep_gtest]
|
||||
)
|
||||
),
|
||||
suite : ['glx'],
|
||||
)
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -157,7 +157,8 @@ if with_tests
|
|||
libintel_compiler, libintel_common, libintel_dev, libmesa_util, libisl,
|
||||
],
|
||||
dependencies : [dep_thread, dep_dl, idep_gtest, idep_nir],
|
||||
)
|
||||
),
|
||||
suite : ['intel'],
|
||||
)
|
||||
endforeach
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ if with_tests
|
|||
dependencies : dep_m,
|
||||
include_directories : [inc_common, inc_intel],
|
||||
link_with : [libisl, libintel_dev, libmesa_util],
|
||||
)
|
||||
),
|
||||
suite : ['intel'],
|
||||
)
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -238,7 +238,8 @@ if with_tests
|
|||
include_directories : [
|
||||
inc_common, inc_intel, inc_compiler, inc_vulkan_util, inc_vulkan_wsi,
|
||||
],
|
||||
)
|
||||
),
|
||||
suite : ['intel'],
|
||||
)
|
||||
endforeach
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ if with_tests
|
|||
'es1-ABI-check',
|
||||
find_program('ABI-check'),
|
||||
env : env_test,
|
||||
args : libglesv1_cm
|
||||
args : libglesv1_cm,
|
||||
suite : ['mapi'],
|
||||
)
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ if with_tests
|
|||
'es2-ABI-check',
|
||||
find_program('ABI-check'),
|
||||
env : env_test,
|
||||
args : libgles2
|
||||
args : libgles2,
|
||||
suite : ['mapi'],
|
||||
)
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ if with_any_opengl and not with_shared_glapi and with_tests
|
|||
include_directories : [inc_include, inc_src, inc_mesa, inc_mapi],
|
||||
link_with : [libglapi_static],
|
||||
dependencies : [idep_gtest, dep_thread],
|
||||
)
|
||||
),
|
||||
suite : ['mapi'],
|
||||
)
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ if with_any_opengl and with_tests
|
|||
include_directories : [inc_src, inc_include, inc_mapi],
|
||||
link_with : [libglapi],
|
||||
dependencies : [dep_thread, idep_gtest],
|
||||
)
|
||||
),
|
||||
suite : ['mapi'],
|
||||
)
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -41,5 +41,6 @@ test(
|
|||
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa],
|
||||
dependencies : [idep_gtest, dep_clock, dep_dl, dep_thread],
|
||||
link_with : [libmesa_classic, link_main_test],
|
||||
)
|
||||
),
|
||||
suite : ['mesa'],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -35,8 +35,9 @@ test(
|
|||
libmesa_st_test_common, libmesa_gallium, libglapi, libgallium,
|
||||
libmesa_util,
|
||||
],
|
||||
dependencies : [idep_gtest, dep_thread]
|
||||
)
|
||||
dependencies : [idep_gtest, dep_thread],
|
||||
),
|
||||
suite : ['st_mesa'],
|
||||
)
|
||||
|
||||
test(
|
||||
|
|
@ -50,5 +51,6 @@ test(
|
|||
libmesa_util,
|
||||
],
|
||||
dependencies : [idep_gtest, dep_thread]
|
||||
)
|
||||
),
|
||||
suite : ['st_mesa'],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -151,7 +151,8 @@ if with_tests
|
|||
include_directories : inc_common,
|
||||
link_with : libmesa_util,
|
||||
c_args : [c_msvc_compat_args],
|
||||
)
|
||||
),
|
||||
suite : ['util'],
|
||||
)
|
||||
|
||||
test(
|
||||
|
|
@ -162,7 +163,8 @@ if with_tests
|
|||
include_directories : inc_common,
|
||||
c_args : [c_msvc_compat_args],
|
||||
dependencies : [dep_m],
|
||||
)
|
||||
),
|
||||
suite : ['util'],
|
||||
)
|
||||
|
||||
test(
|
||||
|
|
@ -173,7 +175,8 @@ if with_tests
|
|||
include_directories : inc_common,
|
||||
link_with : libmesa_util,
|
||||
c_args : [c_msvc_compat_args],
|
||||
)
|
||||
),
|
||||
suite : ['util'],
|
||||
)
|
||||
|
||||
subdir('tests/fast_idiv_by_const')
|
||||
|
|
|
|||
|
|
@ -26,5 +26,6 @@ test(
|
|||
dependencies : [dep_thread, dep_dl, idep_gtest],
|
||||
include_directories : inc_common,
|
||||
link_with : [libmesa_util],
|
||||
)
|
||||
),
|
||||
suite : ['util'],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ foreach t : ['clear', 'collision', 'delete_and_lookup', 'delete_management',
|
|||
dependencies : [dep_thread, dep_dl],
|
||||
include_directories : [inc_include, inc_util],
|
||||
link_with : libmesa_util,
|
||||
)
|
||||
),
|
||||
suite : ['util'],
|
||||
)
|
||||
endforeach
|
||||
|
|
|
|||
|
|
@ -26,5 +26,6 @@ test(
|
|||
dependencies : [dep_thread, dep_dl, idep_gtest],
|
||||
include_directories : inc_common,
|
||||
link_with : [libmesa_util],
|
||||
)
|
||||
),
|
||||
suite : ['util'],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,5 +26,6 @@ test(
|
|||
dependencies : [dep_thread, dep_dl, idep_gtest],
|
||||
include_directories : inc_common,
|
||||
link_with : [libmesa_util],
|
||||
)
|
||||
),
|
||||
suite : ['util'],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -25,5 +25,6 @@ test(
|
|||
'vma_random_test.cpp',
|
||||
include_directories : [inc_include, inc_util],
|
||||
link_with : [libmesa_util],
|
||||
)
|
||||
),
|
||||
suite : ['util'],
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue