1gtest_dep = dependency('gtest') 2gtest_main_dep = dependency('gtest_main') 3gmock_dep = dependency('gmock') 4gmock_main_dep = dependency('gmock_main') 5 6tests = [ 7 'bus/list_names', 8 'bus/match', 9 'exception/sdbus_error', 10 'message/append', 11 'message/read', 12 'message/native_types', 13 'message/types', 14 'timer', 15 'utility/tuple_to_array', 16 'utility/type_traits', 17] 18 19foreach t : tests 20 test( 21 'test_' + t.underscorify(), 22 executable( 23 'test-' + t.underscorify(), 24 t + '.cpp', 25 dependencies: [ 26 gtest_dep, 27 gmock_dep, 28 gmock_main_dep, 29 sdbusplus_dep, 30 ], 31 ) 32 ) 33endforeach 34 35test( 36 'test-bus_aio', 37 executable( 38 'test-bus_aio', 39 'bus/aio.cpp', 40 dependencies: [ 41 boost_dep, 42 gmock_dep, 43 gmock_main_dep, 44 gtest_dep, 45 sdbusplus_dep, 46 ], 47 ) 48) 49 50test( 51 'test-vtable', 52 executable( 53 'test-vtable', 54 'vtable/vtable.cpp', 55 'vtable/vtable_c.c', 56 dependencies: [ gtest_dep, gtest_main_dep, sdbusplus_dep ], 57 ), 58) 59 60server_buildroot = meson.current_build_dir() 61server_files = files( 62 run_command( 63 sdbusgen_prog, 64 '--tool', sdbusplusplus_prog, 65 '--output', server_buildroot, 66 'server', 67 check: true 68 ).stdout().strip().split('\n') 69) 70 71test( 72 'test-server', 73 executable( 74 'test-server', 75 'server/object.cpp', 76 server_files, 77 include_directories: include_directories('server'), 78 dependencies: [ 79 gmock_dep, 80 gmock_main_dep, 81 gtest_dep, 82 pthread_dep, 83 sdbusplus_dep, 84 ], 85 ), 86) 87