nir: Use a single binary for gtests

Less artifacts and less time running linker.  The
load_store_vectorizer test is still split since we need to update
gitlab-ci scripts to skip certain tests in certain builds. Added a
TODO with the concrete suggestion.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13414>
This commit is contained in:
Caio Marcelo de Oliveira Filho 2021-10-18 08:50:15 -07:00 committed by Marge Bot
parent 8cb7d6f81b
commit 662fbc0120
1 changed files with 16 additions and 143 deletions

View File

@ -370,52 +370,22 @@ nir_algebraic_py = files('nir_algebraic.py')
if with_tests
test(
'nir_builder',
'nir_tests',
executable(
'nir_builder_test',
files('tests/builder_tests.cpp'),
cpp_args : [cpp_msvc_compat_args],
gnu_symbol_visibility : 'hidden',
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil],
),
suite : ['compiler', 'nir'],
protocol : gtest_test_protocol,
)
test(
'nir_control_flow',
executable(
'nir_control_flow_test',
files('tests/control_flow_tests.cpp'),
cpp_args : [cpp_msvc_compat_args],
gnu_symbol_visibility : 'hidden',
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil],
),
suite : ['compiler', 'nir'],
protocol : gtest_test_protocol,
)
test(
'nir_core',
executable(
'nir_core_test',
files('tests/core_tests.cpp'),
cpp_args : [cpp_msvc_compat_args],
gnu_symbol_visibility : 'hidden',
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil],
),
suite : ['compiler', 'nir'],
protocol : gtest_test_protocol,
)
test(
'nir_vars',
executable(
'nir_vars_test',
files('tests/vars_tests.cpp'),
'nir_tests',
files(
'tests/algebraic_tests.cpp',
'tests/builder_tests.cpp',
'tests/comparison_pre_tests.cpp',
'tests/control_flow_tests.cpp',
'tests/core_tests.cpp',
'tests/lower_returns_tests.cpp',
'tests/negative_equal_tests.cpp',
'tests/opt_if_tests.cpp',
'tests/serialize_tests.cpp',
'tests/ssa_def_bits_used_tests.cpp',
'tests/vars_tests.cpp',
),
cpp_args : [cpp_msvc_compat_args],
gnu_symbol_visibility : 'hidden',
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
@ -434,34 +404,6 @@ if with_tests
suite : ['compiler', 'nir'],
)
test(
'negative_equal',
executable(
'negative_equal',
files('tests/negative_equal_tests.cpp'),
c_args : [c_msvc_compat_args, no_override_init_args],
gnu_symbol_visibility : 'hidden',
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil],
),
suite : ['compiler', 'nir'],
protocol : gtest_test_protocol,
)
test(
'comparison_pre',
executable(
'comparison_pre',
files('tests/comparison_pre_tests.cpp'),
c_args : [c_msvc_compat_args, no_override_init_args],
gnu_symbol_visibility : 'hidden',
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil],
),
suite : ['compiler', 'nir'],
protocol : gtest_test_protocol,
)
test(
'load_store_vectorizer',
executable(
@ -473,77 +415,8 @@ if with_tests
dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil],
),
suite : ['compiler', 'nir'],
# TODO: Use a negative filter for gtest instead of the expect failure here.
should_fail : meson.get_cross_property('xfail', '').contains('load_store_vectorizer'),
protocol : gtest_test_protocol,
)
test(
'nir_serialize_test',
executable(
'nir_serialize_test',
files('tests/serialize_tests.cpp'),
cpp_args : [cpp_msvc_compat_args],
gnu_symbol_visibility : 'hidden',
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil],
),
suite : ['compiler', 'nir'],
protocol : gtest_test_protocol,
)
test(
'nir_opt_if',
executable(
'nir_opt_if_tests',
files('tests/opt_if_tests.cpp'),
cpp_args : [cpp_msvc_compat_args],
gnu_symbol_visibility : 'hidden',
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil],
),
suite : ['compiler', 'nir'],
protocol : gtest_test_protocol,
)
test(
'nir_lower_returns',
executable(
'nir_lower_returns_tests',
files('tests/lower_returns_tests.cpp'),
cpp_args : [cpp_msvc_compat_args],
gnu_symbol_visibility : 'hidden',
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil],
),
suite : ['compiler', 'nir'],
protocol : gtest_test_protocol,
)
test(
'ssa_def_bits_used',
executable(
'ssa_def_bits_used',
files('tests/ssa_def_bits_used_tests.cpp'),
c_args : [c_msvc_compat_args, no_override_init_args],
gnu_symbol_visibility : 'hidden',
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil],
),
suite : ['compiler', 'nir'],
protocol : gtest_test_protocol,
)
test(
'algebraic',
executable(
'algebraic',
files('tests/algebraic_tests.cpp'),
c_args : [c_msvc_compat_args, no_override_init_args],
gnu_symbol_visibility : 'hidden',
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil],
),
suite : ['compiler', 'nir'],
protocol : gtest_test_protocol,
)
endif