13b472e71SThomas Huthsubdir('bench') 298487b90SPaolo Bonzinisubdir('qemu-iotests') 3a52f4a7aSMarc-André Lureau 437e27776SMarc-André Lureautest_qapi_outputs = [ 537e27776SMarc-André Lureau 'qapi-builtin-types.c', 637e27776SMarc-André Lureau 'qapi-builtin-types.h', 737e27776SMarc-André Lureau 'qapi-builtin-visit.c', 837e27776SMarc-André Lureau 'qapi-builtin-visit.h', 937e27776SMarc-André Lureau 'test-qapi-commands-sub-sub-module.c', 1037e27776SMarc-André Lureau 'test-qapi-commands-sub-sub-module.h', 1137e27776SMarc-André Lureau 'test-qapi-commands.c', 1237e27776SMarc-André Lureau 'test-qapi-commands.h', 1337e27776SMarc-André Lureau 'test-qapi-emit-events.c', 1437e27776SMarc-André Lureau 'test-qapi-emit-events.h', 1537e27776SMarc-André Lureau 'test-qapi-events-sub-sub-module.c', 1637e27776SMarc-André Lureau 'test-qapi-events-sub-sub-module.h', 1737e27776SMarc-André Lureau 'test-qapi-events.c', 1837e27776SMarc-André Lureau 'test-qapi-events.h', 1937e27776SMarc-André Lureau 'test-qapi-init-commands.c', 2037e27776SMarc-André Lureau 'test-qapi-init-commands.h', 2137e27776SMarc-André Lureau 'test-qapi-introspect.c', 2237e27776SMarc-André Lureau 'test-qapi-introspect.h', 2337e27776SMarc-André Lureau 'test-qapi-types-sub-sub-module.c', 2437e27776SMarc-André Lureau 'test-qapi-types-sub-sub-module.h', 2537e27776SMarc-André Lureau 'test-qapi-types.c', 2637e27776SMarc-André Lureau 'test-qapi-types.h', 2737e27776SMarc-André Lureau 'test-qapi-visit-sub-sub-module.c', 2837e27776SMarc-André Lureau 'test-qapi-visit-sub-sub-module.h', 2937e27776SMarc-André Lureau 'test-qapi-visit.c', 3037e27776SMarc-André Lureau 'test-qapi-visit.h', 3137e27776SMarc-André Lureau] 3237e27776SMarc-André Lureau 33378dfa48SVladimir Sementsov-Ogievskiy# Problem: to generate trace events, we'd have to add the .trace-events 34378dfa48SVladimir Sementsov-Ogievskiy# file to qapi_trace_events like we do in qapi/meson.build. Since 35378dfa48SVladimir Sementsov-Ogievskiy# qapi_trace_events is used by trace/meson.build, we'd have to move 36378dfa48SVladimir Sementsov-Ogievskiy# subdir('tests') above subdir('trace') in the top-level meson.build. 37378dfa48SVladimir Sementsov-Ogievskiy# Can't, because it would break the dependency of qga on qemuutil (which 38378dfa48SVladimir Sementsov-Ogievskiy# depends on trace_ss). Not worth solving now; simply suppress trace 39378dfa48SVladimir Sementsov-Ogievskiy# event generation instead. 4037e27776SMarc-André Lureautest_qapi_files = custom_target('Test QAPI files', 4137e27776SMarc-André Lureau output: test_qapi_outputs, 4237e27776SMarc-André Lureau input: files('qapi-schema/qapi-schema-test.json', 4337e27776SMarc-André Lureau 'qapi-schema/include/sub-module.json', 4437e27776SMarc-André Lureau 'qapi-schema/sub-sub-module.json'), 4537e27776SMarc-André Lureau command: [ qapi_gen, '-o', meson.current_build_dir(), 46761a1a48SVladimir Sementsov-Ogievskiy '-b', '-p', 'test-', '@INPUT0@', 47761a1a48SVladimir Sementsov-Ogievskiy '--suppress-tracing' ], 4837e27776SMarc-André Lureau depend_files: qapi_gen_depends) 4937e27776SMarc-André Lureau 5037e27776SMarc-André Lureau# meson doesn't like generated output in other directories 5137e27776SMarc-André Lureau# perhaps change qapi_gen to replace / with _, like Meson itself does? 5237e27776SMarc-André Lureausubdir('include') 5337e27776SMarc-André Lureau 5497d6efd0SPaolo Bonzinitest_qapi_sources = [] 5597d6efd0SPaolo Bonzinitest_qapi_headers = [] 5697d6efd0SPaolo Bonzinii = 0 5797d6efd0SPaolo Bonziniforeach o: test_qapi_files.to_list() + test_qapi_files_extra.to_list() 5897d6efd0SPaolo Bonzini if o.full_path().endswith('.h') 5997d6efd0SPaolo Bonzini test_qapi_headers += o 6097d6efd0SPaolo Bonzini endif 6197d6efd0SPaolo Bonzini test_qapi_sources += o 6297d6efd0SPaolo Bonziniendforeach 6397d6efd0SPaolo Bonzini 6497d6efd0SPaolo Bonzinilibtestqapi = static_library('testqapi', sources: [genh, test_qapi_sources]) 6597d6efd0SPaolo Bonzinitestqapi = declare_dependency(link_with: libtestqapi, sources: [genh, test_qapi_headers]) 6637e27776SMarc-André Lureau 67279588d4SMarc-André Lureautest_deps = { 68279588d4SMarc-André Lureau 'test-qht-par': qht_bench, 69279588d4SMarc-André Lureau} 70279588d4SMarc-André Lureau 71d0cda6f4SPaolo Bonziniif have_tools and have_vhost_user and host_os == 'linux' 7289d4dc8fSMarc-André Lureau executable('vhost-user-bridge', 7389d4dc8fSMarc-André Lureau sources: files('vhost-user-bridge.c'), 740df750e9SMarc-André Lureau dependencies: [qemuutil, vhost_user]) 7589d4dc8fSMarc-André Lureauendif 7689d4dc8fSMarc-André Lureau 77656666dcSRichard Hendersonsubdir('decode') 783941996bSPaolo Bonzini 79cfc1a889SPaolo Bonziniif 'CONFIG_TCG' in config_all_accel 803941996bSPaolo Bonzini subdir('fp') 811b4c136bSAlex Bennée subdir('tcg/plugins') 82f77147cdSPhilippe Mathieu-Daudéendif 837f808687SAlex Bennée 84da668aa1SThomas Huthsubdir('unit') 853afe7ab0SPaolo Bonzinisubdir('qapi-schema') 86a2ce7dbdSPaolo Bonzinisubdir('qtest') 874fbcdcd7SMarc-André Lureausubdir('migration') 88*14973778SThomas Huthsubdir('functional') 89