1py3 = import('python').find_installation() 2 3subdir('bench') 4subdir('qemu-iotests') 5 6test_qapi_outputs = [ 7 'qapi-builtin-types.c', 8 'qapi-builtin-types.h', 9 'qapi-builtin-visit.c', 10 'qapi-builtin-visit.h', 11 'test-qapi-commands-sub-sub-module.c', 12 'test-qapi-commands-sub-sub-module.h', 13 'test-qapi-commands.c', 14 'test-qapi-commands.h', 15 'test-qapi-emit-events.c', 16 'test-qapi-emit-events.h', 17 'test-qapi-events-sub-sub-module.c', 18 'test-qapi-events-sub-sub-module.h', 19 'test-qapi-events.c', 20 'test-qapi-events.h', 21 'test-qapi-init-commands.c', 22 'test-qapi-init-commands.h', 23 'test-qapi-introspect.c', 24 'test-qapi-introspect.h', 25 'test-qapi-types-sub-sub-module.c', 26 'test-qapi-types-sub-sub-module.h', 27 'test-qapi-types.c', 28 'test-qapi-types.h', 29 'test-qapi-visit-sub-sub-module.c', 30 'test-qapi-visit-sub-sub-module.h', 31 'test-qapi-visit.c', 32 'test-qapi-visit.h', 33] 34 35test_qapi_files = custom_target('Test QAPI files', 36 output: test_qapi_outputs, 37 input: files('qapi-schema/qapi-schema-test.json', 38 'qapi-schema/include/sub-module.json', 39 'qapi-schema/sub-sub-module.json'), 40 command: [ qapi_gen, '-o', meson.current_build_dir(), 41 '-b', '-p', 'test-', '@INPUT0@' ], 42 depend_files: qapi_gen_depends) 43 44# meson doesn't like generated output in other directories 45# perhaps change qapi_gen to replace / with _, like Meson itself does? 46subdir('include') 47 48test_qapi_sources = [] 49test_qapi_headers = [] 50i = 0 51foreach o: test_qapi_files.to_list() + test_qapi_files_extra.to_list() 52 if o.full_path().endswith('.h') 53 test_qapi_headers += o 54 endif 55 test_qapi_sources += o 56endforeach 57 58libtestqapi = static_library('testqapi', sources: [genh, test_qapi_sources]) 59testqapi = declare_dependency(link_with: libtestqapi, sources: [genh, test_qapi_headers]) 60 61test_deps = { 62 'test-qht-par': qht_bench, 63} 64 65if have_tools and 'CONFIG_VHOST_USER' in config_host and 'CONFIG_LINUX' in config_host 66 executable('vhost-user-bridge', 67 sources: files('vhost-user-bridge.c'), 68 dependencies: [qemuutil, vhost_user]) 69endif 70 71test('decodetree', sh, 72 args: [ files('decode/check.sh'), config_host['PYTHON'], files('../scripts/decodetree.py') ], 73 workdir: meson.current_source_dir() / 'decode', 74 suite: 'decodetree') 75 76if 'CONFIG_TCG' in config_all 77 subdir('fp') 78endif 79 80if not get_option('tcg').disabled() 81 if 'CONFIG_PLUGIN' in config_host 82 subdir('plugin') 83 endif 84endif 85 86subdir('unit') 87subdir('qapi-schema') 88subdir('qtest') 89subdir('migration') 90