Module: Mesa Branch: main Commit: ff290167536347a6831034a996b9ee1a8c3e5d6b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ff290167536347a6831034a996b9ee1a8c3e5d6b
Author: Yonggang Luo <[email protected]> Date: Mon Jun 5 23:50:37 2023 +0800 meson: Guard the glsl tests that only working when OpenGL ES2 is enabled Reviewed-by: Eric Engestrom <[email protected]> Signed-off-by: Yonggang Luo <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23793> --- src/compiler/glsl/tests/meson.build | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/src/compiler/glsl/tests/meson.build b/src/compiler/glsl/tests/meson.build index 6501112a2d7..2ec28533654 100644 --- a/src/compiler/glsl/tests/meson.build +++ b/src/compiler/glsl/tests/meson.build @@ -18,13 +18,24 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +general_ir_test_files = files( + 'array_refcount_test.cpp', + 'builtin_variable_test.cpp', + 'general_ir_test.cpp', + 'lower_int64_test.cpp', + 'opt_add_neg_to_sub_test.cpp', +) +general_ir_test_files += ir_expression_operation_h + +if with_gles2 + general_ir_test_files += files('test_gl_lower_mediump.cpp') +endif + test( 'general_ir_test', executable( 'general_ir_test', - ['array_refcount_test.cpp', 'builtin_variable_test.cpp', - 'general_ir_test.cpp', 'lower_int64_test.cpp', - 'opt_add_neg_to_sub_test.cpp', 'test_gl_lower_mediump.cpp', ir_expression_operation_h], + general_ir_test_files, 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, inc_glsl], @@ -101,12 +112,14 @@ if with_tools.contains('glsl') ], suite : ['compiler', 'glsl'], ) - test( - 'glsl lower-precision test', - prog_python, - args : [files('lower_precision_test.py'), - glsl_compiler - ], - suite : ['compiler', 'glsl'], - ) + if with_gles2 + test( + 'glsl lower-precision test', + prog_python, + args : [files('lower_precision_test.py'), + glsl_compiler + ], + suite : ['compiler', 'glsl'], + ) + endif endif
