xref: /openbmc/qemu/tests/meson.build (revision 37e2777670dcf25f65929a871f246c6c012d8b03)
1*37e27776SMarc-André Lureautest_qapi_outputs = [
2*37e27776SMarc-André Lureau  'qapi-builtin-types.c',
3*37e27776SMarc-André Lureau  'qapi-builtin-types.h',
4*37e27776SMarc-André Lureau  'qapi-builtin-visit.c',
5*37e27776SMarc-André Lureau  'qapi-builtin-visit.h',
6*37e27776SMarc-André Lureau  'test-qapi-commands-sub-sub-module.c',
7*37e27776SMarc-André Lureau  'test-qapi-commands-sub-sub-module.h',
8*37e27776SMarc-André Lureau  'test-qapi-commands.c',
9*37e27776SMarc-André Lureau  'test-qapi-commands.h',
10*37e27776SMarc-André Lureau  'test-qapi-emit-events.c',
11*37e27776SMarc-André Lureau  'test-qapi-emit-events.h',
12*37e27776SMarc-André Lureau  'test-qapi-events-sub-sub-module.c',
13*37e27776SMarc-André Lureau  'test-qapi-events-sub-sub-module.h',
14*37e27776SMarc-André Lureau  'test-qapi-events.c',
15*37e27776SMarc-André Lureau  'test-qapi-events.h',
16*37e27776SMarc-André Lureau  'test-qapi-init-commands.c',
17*37e27776SMarc-André Lureau  'test-qapi-init-commands.h',
18*37e27776SMarc-André Lureau  'test-qapi-introspect.c',
19*37e27776SMarc-André Lureau  'test-qapi-introspect.h',
20*37e27776SMarc-André Lureau  'test-qapi-types-sub-sub-module.c',
21*37e27776SMarc-André Lureau  'test-qapi-types-sub-sub-module.h',
22*37e27776SMarc-André Lureau  'test-qapi-types.c',
23*37e27776SMarc-André Lureau  'test-qapi-types.h',
24*37e27776SMarc-André Lureau  'test-qapi-visit-sub-sub-module.c',
25*37e27776SMarc-André Lureau  'test-qapi-visit-sub-sub-module.h',
26*37e27776SMarc-André Lureau  'test-qapi-visit.c',
27*37e27776SMarc-André Lureau  'test-qapi-visit.h',
28*37e27776SMarc-André Lureau]
29*37e27776SMarc-André Lureau
30*37e27776SMarc-André Lureautest_qapi_files = custom_target('Test QAPI files',
31*37e27776SMarc-André Lureau                                output: test_qapi_outputs,
32*37e27776SMarc-André Lureau                                input: files('qapi-schema/qapi-schema-test.json',
33*37e27776SMarc-André Lureau                                             'qapi-schema/include/sub-module.json',
34*37e27776SMarc-André Lureau                                             'qapi-schema/sub-sub-module.json'),
35*37e27776SMarc-André Lureau                                command: [ qapi_gen, '-o', meson.current_build_dir(),
36*37e27776SMarc-André Lureau                                           '-b', '-p', 'test-', '@INPUT0@' ],
37*37e27776SMarc-André Lureau                                depend_files: qapi_gen_depends)
38*37e27776SMarc-André Lureau
39*37e27776SMarc-André Lureau# meson doesn't like generated output in other directories
40*37e27776SMarc-André Lureau# perhaps change qapi_gen to replace / with _, like Meson itself does?
41*37e27776SMarc-André Lureausubdir('include')
42*37e27776SMarc-André Lureau
43*37e27776SMarc-André Lureaulibtestqapi = static_library('testqapi', sources: [test_qapi_files, test_qapi_outputs_extra])
44*37e27776SMarc-André Lureautestqapi = declare_dependency(link_with: libtestqapi)
45*37e27776SMarc-André Lureau
46d3ca592bSPaolo Bonziniif have_system and 'CONFIG_POSIX' in config_host
47d3ca592bSPaolo Bonzini  subdir('qemu-iotests')
48d3ca592bSPaolo Bonziniendif
49d3ca592bSPaolo Bonzini
50ce1c1e7aSPaolo Bonzinitest('decodetree', sh,
51ce1c1e7aSPaolo Bonzini     args: [ files('decode/check.sh'), config_host['PYTHON'], files('../scripts/decodetree.py') ],
52ce1c1e7aSPaolo Bonzini     workdir: meson.current_source_dir() / 'decode',
53ce1c1e7aSPaolo Bonzini     suite: 'decodetree')
543941996bSPaolo Bonzini
553941996bSPaolo Bonziniif 'CONFIG_TCG' in config_host
563941996bSPaolo Bonzini  subdir('fp')
57ffac93dfSPaolo Bonzini  if 'CONFIG_PLUGIN' in config_host
58ffac93dfSPaolo Bonzini    subdir('plugin')
59ffac93dfSPaolo Bonzini  endif
603941996bSPaolo Bonziniendif
613afe7ab0SPaolo Bonzini
623afe7ab0SPaolo Bonzinisubdir('qapi-schema')
63a2ce7dbdSPaolo Bonzinisubdir('qtest')
64