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