xref: /aosp_15_r20/external/mesa3d/src/compiler/glsl/tests/meson.build (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1# Copyright © 2017 Intel Corporation
2# SPDX-License-Identifier: MIT
3
4general_ir_test_files = files(
5  'array_refcount_test.cpp',
6  'builtin_variable_test.cpp',
7  'general_ir_test.cpp',
8)
9general_ir_test_files += ir_expression_operation_h
10
11if with_gles2
12  general_ir_test_files += files('test_gl_lower_mediump.cpp')
13endif
14
15test(
16  'general_ir_test',
17  executable(
18    'general_ir_test',
19    general_ir_test_files,
20    cpp_args : [cpp_msvc_compat_args],
21    gnu_symbol_visibility : 'hidden',
22    include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_glsl],
23    link_with : [libglsl, libglsl_standalone, libglsl_util],
24    dependencies : [dep_clock, dep_thread, idep_gtest, idep_mesautil, idep_nir],
25  ),
26  suite : ['compiler', 'glsl'],
27  protocol : 'gtest',
28)
29
30test(
31  'sampler_types_test',
32  executable(
33    'sampler_types_test',
34    ['sampler_types_test.cpp', ir_expression_operation_h],
35    cpp_args : [cpp_msvc_compat_args],
36    gnu_symbol_visibility : 'hidden',
37    include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_glsl],
38    link_with : [libglsl, libglsl_util],
39    dependencies : [dep_thread, idep_gtest, idep_mesautil, idep_compiler],
40  ),
41  suite : ['compiler', 'glsl'],
42  protocol : 'gtest',
43)
44
45test(
46  'list_iterators',
47  executable(
48    'list_iterators',
49    ['list_iterators.cpp'],
50    cpp_args : [cpp_msvc_compat_args],
51    gnu_symbol_visibility : 'hidden',
52    include_directories : [inc_include, inc_src, inc_glsl],
53    link_with : [libglsl, libglsl_util],
54    dependencies : [dep_thread, idep_gtest],
55  ),
56  suite : ['compiler', 'glsl'],
57  protocol : 'gtest',
58)
59
60# Meson can't auto-skip these on cross builds because of the python wrapper
61if meson.can_run_host_binaries()
62  test(
63    'glsl compiler warnings',
64    prog_python,
65    args : [
66      files('warnings_test.py'),
67      '--glsl-compiler', glsl_compiler,
68      '--test-directory', join_paths(
69        dir_source_root, 'src', 'compiler', 'glsl', 'tests', 'warnings'
70      ),
71    ],
72    suite : ['compiler', 'glsl'],
73    timeout: 60,
74  )
75
76  test(
77    'glsl optimization',
78    prog_python,
79    args : [
80      files('optimization_test.py'),
81      '--test-runner', glsl_test
82    ],
83    suite : ['compiler', 'glsl'],
84  )
85endif
86
87if with_tools.contains('glsl')
88  if with_gles2
89    test(
90      'glsl lower-precision test',
91      prog_python,
92      args : [files('lower_precision_test.py'),
93              glsl_compiler
94            ],
95      suite : ['compiler', 'glsl'],
96      timeout: 60,
97    )
98  endif
99endif
100