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