]>
Commit | Line | Data |
---|---|---|
279588d4 MAL |
1 | py3 = import('python').find_installation() |
2 | ||
3b472e71 | 3 | subdir('bench') |
98487b90 | 4 | subdir('qemu-iotests') |
a52f4a7a | 5 | |
37e27776 MAL |
6 | test_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 | ||
378dfa48 VSO |
35 | # Problem: to generate trace events, we'd have to add the .trace-events |
36 | # file to qapi_trace_events like we do in qapi/meson.build. Since | |
37 | # qapi_trace_events is used by trace/meson.build, we'd have to move | |
38 | # subdir('tests') above subdir('trace') in the top-level meson.build. | |
39 | # Can't, because it would break the dependency of qga on qemuutil (which | |
40 | # depends on trace_ss). Not worth solving now; simply suppress trace | |
41 | # event generation instead. | |
37e27776 MAL |
42 | test_qapi_files = custom_target('Test QAPI files', |
43 | output: test_qapi_outputs, | |
44 | input: files('qapi-schema/qapi-schema-test.json', | |
45 | 'qapi-schema/include/sub-module.json', | |
46 | 'qapi-schema/sub-sub-module.json'), | |
47 | command: [ qapi_gen, '-o', meson.current_build_dir(), | |
761a1a48 VSO |
48 | '-b', '-p', 'test-', '@INPUT0@', |
49 | '--suppress-tracing' ], | |
37e27776 MAL |
50 | depend_files: qapi_gen_depends) |
51 | ||
52 | # meson doesn't like generated output in other directories | |
53 | # perhaps change qapi_gen to replace / with _, like Meson itself does? | |
54 | subdir('include') | |
55 | ||
97d6efd0 PB |
56 | test_qapi_sources = [] |
57 | test_qapi_headers = [] | |
58 | i = 0 | |
59 | foreach o: test_qapi_files.to_list() + test_qapi_files_extra.to_list() | |
60 | if o.full_path().endswith('.h') | |
61 | test_qapi_headers += o | |
62 | endif | |
63 | test_qapi_sources += o | |
64 | endforeach | |
65 | ||
66 | libtestqapi = static_library('testqapi', sources: [genh, test_qapi_sources]) | |
67 | testqapi = declare_dependency(link_with: libtestqapi, sources: [genh, test_qapi_headers]) | |
37e27776 | 68 | |
279588d4 MAL |
69 | test_deps = { |
70 | 'test-qht-par': qht_bench, | |
71 | } | |
72 | ||
27d551c0 | 73 | if have_tools and 'CONFIG_VHOST_USER' in config_host and 'CONFIG_LINUX' in config_host |
89d4dc8f MAL |
74 | executable('vhost-user-bridge', |
75 | sources: files('vhost-user-bridge.c'), | |
0df750e9 | 76 | dependencies: [qemuutil, vhost_user]) |
89d4dc8f MAL |
77 | endif |
78 | ||
ce1c1e7a PB |
79 | test('decodetree', sh, |
80 | args: [ files('decode/check.sh'), config_host['PYTHON'], files('../scripts/decodetree.py') ], | |
81 | workdir: meson.current_source_dir() / 'decode', | |
82 | suite: 'decodetree') | |
3941996b | 83 | |
f77147cd PMD |
84 | if 'CONFIG_TCG' in config_all |
85 | subdir('fp') | |
86 | endif | |
7f808687 | 87 | |
43a363ae | 88 | if get_option('tcg').allowed() |
ffac93df PB |
89 | if 'CONFIG_PLUGIN' in config_host |
90 | subdir('plugin') | |
91 | endif | |
3941996b | 92 | endif |
3afe7ab0 | 93 | |
da668aa1 | 94 | subdir('unit') |
3afe7ab0 | 95 | subdir('qapi-schema') |
a2ce7dbd | 96 | subdir('qtest') |
4fbcdcd7 | 97 | subdir('migration') |