meson: Run the test with Python 3
[mesa.git] / src / compiler / glsl / tests / meson.build
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
21 test(
22 'blob_test',
23 executable(
24 'blob_test',
25 'blob_test.c',
26 c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
27 include_directories : [inc_common, inc_compiler],
28 link_with : [libglsl],
29 )
30 )
31
32 test(
33 'cache_test',
34 executable(
35 'cache_test',
36 'cache_test.c',
37 c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
38 include_directories : [inc_common, inc_glsl],
39 link_with : [libglsl],
40 dependencies : [dep_clock, dep_thread],
41 )
42 )
43
44
45 test(
46 'general_ir_test',
47 executable(
48 'general_ir_test',
49 ['array_refcount_test.cpp', 'builtin_variable_test.cpp',
50 'invalidate_locations_test.cpp', 'general_ir_test.cpp',
51 'lower_int64_test.cpp', 'opt_add_neg_to_sub_test.cpp',
52 'varyings_test.cpp', ir_expression_operation_h],
53 cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
54 include_directories : [inc_common, inc_glsl],
55 link_with : [libglsl, libglsl_standalone, libglsl_util],
56 dependencies : [dep_clock, dep_thread, idep_gtest],
57 )
58 )
59
60 test(
61 'uniform_initializer_test',
62 executable(
63 'uniform_initializer_test',
64 ['copy_constant_to_storage_tests.cpp', 'set_uniform_initializer_tests.cpp',
65 'uniform_initializer_utils.cpp', 'uniform_initializer_utils.h',
66 ir_expression_operation_h],
67 cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
68 include_directories : [inc_common, inc_glsl],
69 link_with : [libglsl, libglsl_util],
70 dependencies : [dep_thread, idep_gtest],
71 )
72 )
73
74 test(
75 'sampler_types_test',
76 executable(
77 'sampler_types_test',
78 ['sampler_types_test.cpp', ir_expression_operation_h],
79 cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
80 include_directories : [inc_common, inc_glsl],
81 link_with : [libglsl, libglsl_util],
82 dependencies : [dep_thread, idep_gtest],
83 )
84 )
85
86 test(
87 'glsl compiler warnings',
88 prog_python,
89 args : [
90 join_paths(meson.current_source_dir(), 'warnings_test.py'),
91 '--glsl-compiler', glsl_compiler,
92 '--test-directory', join_paths(
93 meson.source_root(), 'src', 'compiler', 'glsl', 'tests', 'warnings'
94 ),
95 ],
96 )
97 test(
98 'glsl optimization',
99 prog_python,
100 args : [
101 join_paths(meson.current_source_dir(), 'optimization_test.py'),
102 '--test-runner', glsl_test
103 ],
104 )