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