1bf215546Sopenharmony_ci
2bf215546Sopenharmony_cir600_test_lib = static_library('r600_test', 'sfn_test_shaders.cpp',
3bf215546Sopenharmony_ci   cpp_args: r600_cpp_args,
4bf215546Sopenharmony_ci   override_options: ['cpp_std=c++17'],
5bf215546Sopenharmony_ci   include_directories : [ inc_src, inc_mapi, inc_mesa, inc_include,
6bf215546Sopenharmony_ci                           inc_compiler, inc_gallium, inc_gallium_aux, inc_amd_common,
7bf215546Sopenharmony_ci                           inc_gallium_drivers, ],
8bf215546Sopenharmony_ci   dependencies : [idep_gtest, dep_thread, dep_llvm, idep_nir,
9bf215546Sopenharmony_ci                     idep_nir_headers],
10bf215546Sopenharmony_ci
11bf215546Sopenharmony_ci)
12bf215546Sopenharmony_ci
13bf215546Sopenharmony_cir600_test_dep = declare_dependency(
14bf215546Sopenharmony_ci    include_directories : [ inc_src, inc_mapi, inc_mesa, inc_include,
15bf215546Sopenharmony_ci                            inc_compiler, inc_gallium, inc_gallium_aux, inc_amd_common,
16bf215546Sopenharmony_ci                            inc_gallium_drivers, ],
17bf215546Sopenharmony_ci    link_with : [ libr600, libmesa, libgalliumvl,  libgallium, libradeonwinsys, r600_test_lib],
18bf215546Sopenharmony_ci    dependencies : [idep_gtest, dep_thread, dep_llvm, idep_nir,
19bf215546Sopenharmony_ci                    idep_nir_headers]
20bf215546Sopenharmony_ci)
21bf215546Sopenharmony_ci
22bf215546Sopenharmony_ci
23bf215546Sopenharmony_ci
24bf215546Sopenharmony_ciif with_tests
25bf215546Sopenharmony_ci   foreach t : ['valuefactory', 'value', 'instr', 'instrfromstring', 'liverange',
26bf215546Sopenharmony_ci                'optimizer', 'shaderfromstring' ]
27bf215546Sopenharmony_ci   test(
28bf215546Sopenharmony_ci       t,
29bf215546Sopenharmony_ci       executable('test-@0@-r600-sfn'.format(t),
30bf215546Sopenharmony_ci                  ['sfn_@0@_test.cpp'.format(t)],
31bf215546Sopenharmony_ci                  dependencies : [r600_test_dep],
32bf215546Sopenharmony_ci                  override_options: ['cpp_std=c++17']
33bf215546Sopenharmony_ci                  ),
34bf215546Sopenharmony_ci       suite : ['r600']
35bf215546Sopenharmony_ci    )
36bf215546Sopenharmony_ci    endforeach
37bf215546Sopenharmony_ciendif
38bf215546Sopenharmony_ci
39