diff options
author | Dylan Baker <[email protected]> | 2017-12-11 16:13:31 -0800 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2018-01-11 15:40:02 -0800 |
commit | 4ccb9816737945159289527322e759d92bf7a4d6 (patch) | |
tree | 5f4cc22fa3d962cfde826599e5a95e26904bdc8d | |
parent | 8e981eb2b7099849c7b74d855afb0c65f92227e8 (diff) |
meson: Use consistent style for tests
Don't use intermediate variables, use consistent whitespace.
Acked-by: Eric Engestrom <[email protected]>
Signed-off-by: Dylan Baker <[email protected]>
-rw-r--r-- | src/broadcom/qpu/meson.build | 12 | ||||
-rw-r--r-- | src/compiler/glsl/tests/meson.build | 90 | ||||
-rw-r--r-- | src/compiler/nir/meson.build | 19 | ||||
-rw-r--r-- | src/egl/wayland/wayland-egl/meson.build | 5 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/meson.build | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r300/meson.build | 4 | ||||
-rw-r--r-- | src/gallium/state_trackers/xvmc/meson.build | 8 | ||||
-rw-r--r-- | src/gbm/meson.build | 3 | ||||
-rw-r--r-- | src/glx/tests/meson.build | 22 | ||||
-rw-r--r-- | src/intel/compiler/meson.build | 19 | ||||
-rw-r--r-- | src/intel/isl/meson.build | 17 | ||||
-rw-r--r-- | src/intel/vulkan/meson.build | 23 | ||||
-rw-r--r-- | src/mapi/es1api/meson.build | 3 | ||||
-rw-r--r-- | src/mapi/es2api/meson.build | 3 | ||||
-rw-r--r-- | src/mapi/glapi/meson.build | 13 | ||||
-rw-r--r-- | src/mapi/shared-glapi/meson.build | 19 | ||||
-rw-r--r-- | src/mesa/main/tests/meson.build | 4 | ||||
-rw-r--r-- | src/util/meson.build | 49 | ||||
-rw-r--r-- | src/util/tests/hash_table/meson.build | 16 | ||||
-rw-r--r-- | src/util/tests/string_buffer/meson.build | 17 |
20 files changed, 199 insertions, 151 deletions
diff --git a/src/broadcom/qpu/meson.build b/src/broadcom/qpu/meson.build index 8178ddbd53b..5521a80ceec 100644 --- a/src/broadcom/qpu/meson.build +++ b/src/broadcom/qpu/meson.build @@ -33,7 +33,11 @@ libbroadcom_qpu = static_library( build_by_default : false, ) -test('qpu_disasm', - executable('qpu_disasm', 'tests/qpu_disasm.c', - link_with: [libbroadcom_qpu, libmesa_util], - include_directories: inc_common)) +test( + 'qpu_disasm', + executable( + 'qpu_disasm', 'tests/qpu_disasm.c', + link_with: [libbroadcom_qpu, libmesa_util], + include_directories: inc_common + ) +) diff --git a/src/compiler/glsl/tests/meson.build b/src/compiler/glsl/tests/meson.build index 27f34075b4b..146647a850c 100644 --- a/src/compiler/glsl/tests/meson.build +++ b/src/compiler/glsl/tests/meson.build @@ -18,59 +18,69 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -glsl_blob_test = executable( +test( 'blob_test', - 'blob_test.c', - c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], - include_directories : [inc_common, inc_compiler], - link_with : [libglsl], + executable( + 'blob_test', + 'blob_test.c', + c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], + include_directories : [inc_common, inc_compiler], + link_with : [libglsl], + ) ) -glsl_cache_test = executable( +test( 'cache_test', - 'cache_test.c', - c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], - include_directories : [inc_common, inc_glsl], - link_with : [libglsl], - dependencies : [dep_clock, dep_thread], + executable( + 'cache_test', + 'cache_test.c', + c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], + include_directories : [inc_common, inc_glsl], + link_with : [libglsl], + dependencies : [dep_clock, dep_thread], + ) ) -glsl_general_ir_test = executable( + +test( 'general_ir_test', - ['array_refcount_test.cpp', 'builtin_variable_test.cpp', - 'invalidate_locations_test.cpp', 'general_ir_test.cpp', - 'lower_int64_test.cpp', 'opt_add_neg_to_sub_test.cpp', 'varyings_test.cpp', - ir_expression_operation_h], - cpp_args : [cpp_vis_args, cpp_msvc_compat_args], - include_directories : [inc_common, inc_glsl], - link_with : [libglsl, libglsl_standalone, libglsl_util], - dependencies : [dep_clock, dep_thread, idep_gtest], + executable( + 'general_ir_test', + ['array_refcount_test.cpp', 'builtin_variable_test.cpp', + 'invalidate_locations_test.cpp', 'general_ir_test.cpp', + 'lower_int64_test.cpp', 'opt_add_neg_to_sub_test.cpp', + 'varyings_test.cpp', ir_expression_operation_h], + cpp_args : [cpp_vis_args, cpp_msvc_compat_args], + include_directories : [inc_common, inc_glsl], + link_with : [libglsl, libglsl_standalone, libglsl_util], + dependencies : [dep_clock, dep_thread, idep_gtest], + ) ) -glsl_uniform_initializer_test = executable( +test( 'uniform_initializer_test', - ['copy_constant_to_storage_tests.cpp', 'set_uniform_initializer_tests.cpp', - 'uniform_initializer_utils.cpp', 'uniform_initializer_utils.h', - ir_expression_operation_h], - cpp_args : [cpp_vis_args, cpp_msvc_compat_args], - include_directories : [inc_common, inc_glsl], - link_with : [libglsl, libglsl_util], - dependencies : [dep_thread, idep_gtest], + executable( + 'uniform_initializer_test', + ['copy_constant_to_storage_tests.cpp', 'set_uniform_initializer_tests.cpp', + 'uniform_initializer_utils.cpp', 'uniform_initializer_utils.h', + ir_expression_operation_h], + cpp_args : [cpp_vis_args, cpp_msvc_compat_args], + include_directories : [inc_common, inc_glsl], + link_with : [libglsl, libglsl_util], + dependencies : [dep_thread, idep_gtest], + ) ) -glsl_sampler_types_test = executable( +test( 'sampler_types_test', - ['sampler_types_test.cpp', ir_expression_operation_h], - cpp_args : [cpp_vis_args, cpp_msvc_compat_args], - include_directories : [inc_common, inc_glsl], - link_with : [libglsl, libglsl_util], - dependencies : [dep_thread, idep_gtest], + executable( + 'sampler_types_test', + ['sampler_types_test.cpp', ir_expression_operation_h], + cpp_args : [cpp_vis_args, cpp_msvc_compat_args], + include_directories : [inc_common, inc_glsl], + link_with : [libglsl, libglsl_util], + dependencies : [dep_thread, idep_gtest], + ) ) -test('blob_test', glsl_blob_test) -test('cache_test', glsl_cache_test) -test('general_ir_test', glsl_general_ir_test) -test('uniform_initializer_test', glsl_uniform_initializer_test) -test('sampler_types_test', glsl_sampler_types_test) - # TODO: figure out how to get the shell based tests to work? diff --git a/src/compiler/nir/meson.build b/src/compiler/nir/meson.build index 5dd21e6652f..54cef67e9e0 100644 --- a/src/compiler/nir/meson.build +++ b/src/compiler/nir/meson.build @@ -208,14 +208,15 @@ libnir = static_library( nir_algebraic_py = files('nir_algebraic.py') if with_tests - nir_control_flow_test = executable( - 'nir_control_flow_test', - [files('tests/control_flow_tests.cpp'), nir_opcodes_h], - c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], - include_directories : [inc_common], - dependencies : [dep_thread, idep_gtest], - link_with : [libmesa_util, libnir], + test( + 'nir_control_flow', + executable( + 'nir_control_flow_test', + [files('tests/control_flow_tests.cpp'), nir_opcodes_h], + c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], + include_directories : [inc_common], + dependencies : [dep_thread, idep_gtest], + link_with : [libmesa_util, libnir], + ) ) - - test('nir_control_flow', nir_control_flow_test) endif diff --git a/src/egl/wayland/wayland-egl/meson.build b/src/egl/wayland/wayland-egl/meson.build index 14c78a3ecbc..c95d4c1d1f4 100644 --- a/src/egl/wayland/wayland-egl/meson.build +++ b/src/egl/wayland/wayland-egl/meson.build @@ -42,5 +42,8 @@ if with_tests find_program('wayland-egl-symbols-check'), args : libwayland_egl ) - test('wayland-egl-abi-check', executable('wayland-egl-abi-check', 'wayland-egl-abi-check.c')) + test( + 'wayland-egl-abi-check', + executable('wayland-egl-abi-check', 'wayland-egl-abi-check.c') + ) endif diff --git a/src/gallium/drivers/llvmpipe/meson.build b/src/gallium/drivers/llvmpipe/meson.build index 597245ee814..0b0ac2a3a02 100644 --- a/src/gallium/drivers/llvmpipe/meson.build +++ b/src/gallium/drivers/llvmpipe/meson.build @@ -111,7 +111,9 @@ driver_swrast = declare_dependency( if with_tests and with_gallium_softpipe and with_llvm foreach t : ['lp_test_format', 'lp_test_arit', 'lp_test_blend', 'lp_test_conv', 'lp_test_printf'] - test(t, executable( + test( + t, + executable( t, ['@[email protected]'.format(t), 'lp_test_main.c'], dependencies : [dep_llvm, dep_dl, dep_thread, dep_clock], diff --git a/src/gallium/drivers/r300/meson.build b/src/gallium/drivers/r300/meson.build index 90fa5949fa4..698e4608ded 100644 --- a/src/gallium/drivers/r300/meson.build +++ b/src/gallium/drivers/r300/meson.build @@ -135,7 +135,9 @@ driver_r300 = declare_dependency( ) if with_tests - test('r300_compiler_test', executable( + test( + 'r300_compiler_test', + executable( 'r300_compiler_test', files( 'compiler/tests/r300_compiler_tests.c', diff --git a/src/gallium/state_trackers/xvmc/meson.build b/src/gallium/state_trackers/xvmc/meson.build index a1022c164b1..2c98b0290d9 100644 --- a/src/gallium/state_trackers/xvmc/meson.build +++ b/src/gallium/state_trackers/xvmc/meson.build @@ -32,7 +32,9 @@ if with_tests dep_real_xvmc = dependency('xvmc') foreach x : ['context', 'surface', 'subpicture', 'blocks', 'rendering'] _name = 'xvmc_@0@'.format(x) - test(_name, executable( + test( + _name, + executable( _name, files('tests/test_@[email protected]'.format(x), 'tests/testlib.c'), dependencies : [ @@ -42,7 +44,9 @@ if with_tests ) endforeach - test('xbmc_bench', executable( + test( + 'xvmc_bench', + executable( 'xvmc_bench', files('tests/xvmc_bench.c', 'tests/testlib.c'), dependencies : [ diff --git a/src/gbm/meson.build b/src/gbm/meson.build index 6e512996add..14b9e960360 100644 --- a/src/gbm/meson.build +++ b/src/gbm/meson.build @@ -71,7 +71,8 @@ pkg.generate( ) if with_tests - test('gbm-symbols-check', + test( + 'gbm-symbols-check', find_program('gbm-symbols-check'), args : libgbm ) diff --git a/src/glx/tests/meson.build b/src/glx/tests/meson.build index 51b2843fc90..fe0075a6939 100644 --- a/src/glx/tests/meson.build +++ b/src/glx/tests/meson.build @@ -33,17 +33,17 @@ if with_shared_glapi files_glx_test += files('query_renderer_implementation_unittest.cpp') endif - glx_test = executable( + test( 'glx-test', - [files_glx_test, glx_indirect_size_h, main_dispatch_h], - link_with : [libglx, libglapi], - include_directories : [ - include_directories('..', '../../../include/GL/internal'), - inc_src, inc_include, inc_mesa, inc_mapi, - ], - dependencies : [dep_libdrm, dep_thread, idep_gtest] + executable( + 'glx-test', + [files_glx_test, glx_indirect_size_h, main_dispatch_h], + link_with : [libglx, libglapi], + include_directories : [ + include_directories('..', '../../../include/GL/internal'), + inc_src, inc_include, inc_mesa, inc_mapi, + ], + dependencies : [dep_libdrm, dep_thread, idep_gtest] + ) ) - - test('glx-test', glx_test) - test('glx-dispatch-index-check', find_program('dispatch-index-check')) endif diff --git a/src/intel/compiler/meson.build b/src/intel/compiler/meson.build index c54c117223c..19e5926a0d9 100644 --- a/src/intel/compiler/meson.build +++ b/src/intel/compiler/meson.build @@ -145,14 +145,17 @@ if with_tests 'fs_saturate_propagation', 'vf_float_conversions', 'vec4_register_coalesce', 'vec4_copy_propagation', 'vec4_cmod_propagation', 'eu_compact', 'eu_validate'] - _exe = executable( - [t, nir_opcodes_h, ir_expression_operation_h], - 'test_@[email protected]'.format(t), - include_directories : [inc_common, inc_intel], - link_with : [libintel_compiler, libintel_common, libnir, libmesa_util, - libisl], - dependencies : [dep_thread, dep_dl, idep_gtest], + test( + t, + executable( + [t, nir_opcodes_h, ir_expression_operation_h], + 'test_@[email protected]'.format(t), + include_directories : [inc_common, inc_intel], + link_with : [ + libintel_compiler, libintel_common, libnir, libmesa_util, libisl, + ], + dependencies : [dep_thread, dep_dl, idep_gtest], + ) ) - test(t, _exe) endforeach endif diff --git a/src/intel/isl/meson.build b/src/intel/isl/meson.build index 47fd8d97c32..116750d86d6 100644 --- a/src/intel/isl/meson.build +++ b/src/intel/isl/meson.build @@ -90,13 +90,14 @@ libisl = static_library( ) if with_tests - isl_surf_get_image_offset_test = executable( - 'isl_surf_get_image_offset_test', - 'tests/isl_surf_get_image_offset_test.c', - dependencies : dep_m, - include_directories : [inc_common, inc_intel], - link_with : [libisl, libintel_common], + test( + 'isl_surf_get_image_offset', + executable( + 'isl_surf_get_image_offset_test', + 'tests/isl_surf_get_image_offset_test.c', + dependencies : dep_m, + include_directories : [inc_common, inc_intel], + link_with : [libisl, libintel_common], + ) ) - - test('isl_surf_get_image_offset', isl_surf_get_image_offset_test) endif diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build index b219201944b..66266a0e95a 100644 --- a/src/intel/vulkan/meson.build +++ b/src/intel/vulkan/meson.build @@ -193,25 +193,28 @@ if with_tests link_whole : libanv_common, link_with : [ libanv_gen_libs, libintel_compiler, libintel_common, libisl, libblorp, - libvulkan_util, libvulkan_wsi, libnir, libmesa_util, + libvulkan_util, libvulkan_wsi, libmesa_util, ], dependencies : [ dep_libdrm, dep_thread, dep_dl, dep_m, anv_deps, dep_valgrind, + idep_nir, ], c_args : [c_vis_args, no_override_init_args, '-msse2', anv_flags], ) foreach t : ['block_pool_no_free', 'state_pool_no_free', 'state_pool_free_list_only', 'state_pool'] - _exe = executable( - t, - ['tests/@[email protected]'.format(t), dummy_cpp, block_entrypoints], - link_with : libvulkan_intel_test, - dependencies : [dep_libdrm, dep_thread, dep_m, dep_valgrind], - include_directories : [ - inc_common, inc_intel, inc_compiler, inc_vulkan_util, inc_vulkan_wsi, - ], + test( + 'anv_@0@'.format(t), + executable( + t, + ['tests/@[email protected]'.format(t), dummy_cpp, block_entrypoints], + link_with : libvulkan_intel_test, + dependencies : [dep_libdrm, dep_thread, dep_m, dep_valgrind], + include_directories : [ + inc_common, inc_intel, inc_compiler, inc_vulkan_util, inc_vulkan_wsi, + ], + ) ) - test('anv_@0@'.format(t), _exe) endforeach endif diff --git a/src/mapi/es1api/meson.build b/src/mapi/es1api/meson.build index 53851da306b..ea14654d2c4 100644 --- a/src/mapi/es1api/meson.build +++ b/src/mapi/es1api/meson.build @@ -52,7 +52,8 @@ pkg.generate( ) if with_tests - test('es1-ABI-check', + test( + 'es1-ABI-check', find_program('ABI-check'), args : libglesv1_cm ) diff --git a/src/mapi/es2api/meson.build b/src/mapi/es2api/meson.build index 8751107cb71..de8a29bb6be 100644 --- a/src/mapi/es2api/meson.build +++ b/src/mapi/es2api/meson.build @@ -52,7 +52,8 @@ pkg.generate( ) if with_tests - test('es2-ABI-check', + test( + 'es2-ABI-check', find_program('ABI-check'), args : libgles2 ) diff --git a/src/mapi/glapi/meson.build b/src/mapi/glapi/meson.build index 8856a95fb66..267cfe7e7be 100644 --- a/src/mapi/glapi/meson.build +++ b/src/mapi/glapi/meson.build @@ -78,12 +78,13 @@ libglapi_static = static_library( ) if not with_shared_glapi and with_tests - glapi_static_check_table = executable( + test( 'glapi_static_check_table', - 'tests/check_table.cpp', - link_with : [libglapi_static], - dependencies : [idep_gtest], + executable( + 'glapi_static_check_table', + 'tests/check_table.cpp', + link_with : [libglapi_static], + dependencies : [idep_gtest], + ) ) - - test('glapi_static_check_table', glapi_static_check_table) endif diff --git a/src/mapi/shared-glapi/meson.build b/src/mapi/shared-glapi/meson.build index fe0d458d934..c7d136ced2c 100644 --- a/src/mapi/shared-glapi/meson.build +++ b/src/mapi/shared-glapi/meson.build @@ -51,14 +51,15 @@ libglapi = shared_library( ) if with_tests - shared_glapi_test = executable( - ['shared-glapi-test', glapitable_h], - 'tests/check_table.cpp', - cpp_args : [cpp_msvc_compat_args], - include_directories : [inc_src, inc_include, inc_mapi], - link_with : [libglapi], - dependencies : [dep_thread, idep_gtest], + test( + 'shared-glapi-test', + executable( + ['shared-glapi-test', glapitable_h], + 'tests/check_table.cpp', + cpp_args : [cpp_msvc_compat_args], + include_directories : [inc_src, inc_include, inc_mapi], + link_with : [libglapi], + dependencies : [dep_thread, idep_gtest], + ) ) - - test('shared-glapi-test', shared_glapi_test) endif diff --git a/src/mesa/main/tests/meson.build b/src/mesa/main/tests/meson.build index 2c1d8e067e8..12be7393945 100644 --- a/src/mesa/main/tests/meson.build +++ b/src/mesa/main/tests/meson.build @@ -33,7 +33,9 @@ else files_main_test += files('stub.cpp') endif -test('main-test', executable( +test( + 'main-test', + executable( 'main_test', [files_main_test, main_dispatch_h], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa], diff --git a/src/util/meson.build b/src/util/meson.build index 225593f5d38..fa591c92e56 100644 --- a/src/util/meson.build +++ b/src/util/meson.build @@ -118,34 +118,39 @@ libxmlconfig = static_library( ) if with_tests - u_atomic_test = executable( - 'u_atomic_test', - files('u_atomic_test.c'), - include_directories : inc_common, - link_with : libmesa_util, - c_args : [c_msvc_compat_args], + test( + 'u_atomic', + executable( + 'u_atomic_test', + files('u_atomic_test.c'), + include_directories : inc_common, + link_with : libmesa_util, + c_args : [c_msvc_compat_args], + ) ) - roundeven_test = executable( - 'roundeven_test', - files('roundeven_test.c'), - include_directories : inc_common, - c_args : [c_msvc_compat_args], - dependencies : [dep_m], + test( + 'roundeven', + executable( + 'roundeven_test', + files('roundeven_test.c'), + include_directories : inc_common, + c_args : [c_msvc_compat_args], + dependencies : [dep_m], + ) ) - mesa_sha1_test = executable( - 'mesa-sha1_test', - files('mesa-sha1_test.c'), - include_directories : inc_common, - link_with : libmesa_util, - c_args : [c_msvc_compat_args], + test( + 'mesa-sha1', + executable( + 'mesa-sha1_test', + files('mesa-sha1_test.c'), + include_directories : inc_common, + link_with : libmesa_util, + c_args : [c_msvc_compat_args], + ) ) - test('u_atomic', u_atomic_test) - test('roundeven', roundeven_test) - test('mesa-sha1', mesa_sha1_test) - subdir('tests/hash_table') subdir('tests/string_buffer') endif diff --git a/src/util/tests/hash_table/meson.build b/src/util/tests/hash_table/meson.build index 43d8f43a83e..4bbc5100ea3 100644 --- a/src/util/tests/hash_table/meson.build +++ b/src/util/tests/hash_table/meson.build @@ -21,12 +21,14 @@ foreach t : ['clear', 'collision', 'delete_and_lookup', 'delete_management', 'destroy_callback', 'insert_and_lookup', 'insert_many', 'null_destroy', 'random_entry', 'remove_null', 'replacement'] - _test = executable( - '@0@_test'.format(t), - files('@[email protected]'.format(t)), - dependencies : [dep_thread, dep_dl], - include_directories : [inc_include, inc_util], - link_with : libmesa_util, + test( + t, + executable( + '@0@_test'.format(t), + files('@[email protected]'.format(t)), + dependencies : [dep_thread, dep_dl], + include_directories : [inc_include, inc_util], + link_with : libmesa_util, + ) ) - test(t, _test) endforeach diff --git a/src/util/tests/string_buffer/meson.build b/src/util/tests/string_buffer/meson.build index 14dbebca7d8..9f42e3550ae 100644 --- a/src/util/tests/string_buffer/meson.build +++ b/src/util/tests/string_buffer/meson.build @@ -18,12 +18,13 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -string_buffer_test = executable( - 'string_buffer_test', - 'string_buffer_test.cpp', - dependencies : [dep_thread, dep_dl, idep_gtest], - include_directories : inc_common, - link_with : [libmesa_util], +test( + 'string_buffer', + executable( + 'string_buffer_test', + 'string_buffer_test.cpp', + dependencies : [dep_thread, dep_dl, idep_gtest], + include_directories : inc_common, + link_with : [libmesa_util], + ) ) - -test('string_buffer', string_buffer_test) |