1# Copyright © 2017 Intel Corporation 2 3# Permission is hereby granted, free of charge, to any person obtaining a copy 4# of this software and associated documentation files (the "Software"), to deal 5# in the Software without restriction, including without limitation the rights 6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7# copies of the Software, and to permit persons to whom the Software is 8# furnished to do so, subject to the following conditions: 9 10# The above copyright notice and this permission notice shall be included in 11# all copies or substantial portions of the Software. 12 13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19# SOFTWARE. 20 21test( 22 'general_ir_test', 23 executable( 24 'general_ir_test', 25 ['array_refcount_test.cpp', 'builtin_variable_test.cpp', 26 'general_ir_test.cpp', 'lower_int64_test.cpp', 27 'opt_add_neg_to_sub_test.cpp', ir_expression_operation_h], 28 cpp_args : [cpp_msvc_compat_args], 29 gnu_symbol_visibility : 'hidden', 30 include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_glsl], 31 link_with : [libglsl, libglsl_standalone, libglsl_util], 32 dependencies : [dep_clock, dep_thread, idep_gtest, idep_mesautil], 33 ), 34 suite : ['compiler', 'glsl'], 35 protocol : gtest_test_protocol, 36) 37 38test( 39 'sampler_types_test', 40 executable( 41 'sampler_types_test', 42 ['sampler_types_test.cpp', ir_expression_operation_h], 43 cpp_args : [cpp_msvc_compat_args], 44 gnu_symbol_visibility : 'hidden', 45 include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_glsl], 46 link_with : [libglsl, libglsl_util], 47 dependencies : [dep_thread, idep_gtest, idep_mesautil], 48 ), 49 suite : ['compiler', 'glsl'], 50 protocol : gtest_test_protocol, 51) 52 53test( 54 'list_iterators', 55 executable( 56 'list_iterators', 57 ['list_iterators.cpp'], 58 cpp_args : [cpp_msvc_compat_args], 59 gnu_symbol_visibility : 'hidden', 60 include_directories : [inc_include, inc_src, inc_glsl], 61 link_with : [libglsl, libglsl_util], 62 dependencies : [dep_thread, idep_gtest], 63 ), 64 suite : ['compiler', 'glsl'], 65 protocol : gtest_test_protocol, 66) 67 68# Meson can't auto-skip these on cross builds because of the python wrapper 69# 70# TODO: has_exe_wrapper() is deprecated and renamed to can_run_host_binaries() 71# starting with Meson 0.55.0 72if meson.has_exe_wrapper() 73 test( 74 'glsl compiler warnings', 75 prog_python, 76 args : [ 77 join_paths(meson.current_source_dir(), 'warnings_test.py'), 78 '--glsl-compiler', glsl_compiler, 79 '--test-directory', join_paths( 80 meson.source_root(), 'src', 'compiler', 'glsl', 'tests', 'warnings' 81 ), 82 ], 83 suite : ['compiler', 'glsl'], 84 timeout: 60, 85 ) 86 87 test( 88 'glsl optimization', 89 prog_python, 90 args : [ 91 join_paths(meson.current_source_dir(), 'optimization_test.py'), 92 '--test-runner', glsl_test 93 ], 94 suite : ['compiler', 'glsl'], 95 ) 96endif 97 98if with_tools.contains('glsl') 99 test( 100 'glsl dump-builder test', 101 glsl_compiler, 102 args : ['--version', '110', '--dump-builder', 103 join_paths(meson.current_source_dir(), 'standalone_dump-builder.frag'), 104 ], 105 suite : ['compiler', 'glsl'], 106 ) 107 test( 108 'glsl lower-precision test', 109 prog_python, 110 args : [join_paths(meson.current_source_dir(), 'lower_precision_test.py'), 111 glsl_compiler 112 ], 113 suite : ['compiler', 'glsl'], 114 ) 115endif 116