mirror of
https://github.com/qemu/qemu.git
synced 2024-11-23 19:03:38 +08:00
1497377857
Provide a meson.build file for the upcoming python-based functional tests, and add some wrapper glue targets to the tests/Makefile.include file. We are going to use two "speed" modes for the functional tests: The "quick" tests can be run at any time (i.e. also during "make check"), while the "thorough" tests should only be run when running a "make check-functional" test run (since these tests might download additional assets from the internet). The changes to the meson.build files are partly based on an earlier patch by Ani Sinha. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-12-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
89 lines
2.9 KiB
Meson
89 lines
2.9 KiB
Meson
subdir('bench')
|
|
subdir('qemu-iotests')
|
|
|
|
test_qapi_outputs = [
|
|
'qapi-builtin-types.c',
|
|
'qapi-builtin-types.h',
|
|
'qapi-builtin-visit.c',
|
|
'qapi-builtin-visit.h',
|
|
'test-qapi-commands-sub-sub-module.c',
|
|
'test-qapi-commands-sub-sub-module.h',
|
|
'test-qapi-commands.c',
|
|
'test-qapi-commands.h',
|
|
'test-qapi-emit-events.c',
|
|
'test-qapi-emit-events.h',
|
|
'test-qapi-events-sub-sub-module.c',
|
|
'test-qapi-events-sub-sub-module.h',
|
|
'test-qapi-events.c',
|
|
'test-qapi-events.h',
|
|
'test-qapi-init-commands.c',
|
|
'test-qapi-init-commands.h',
|
|
'test-qapi-introspect.c',
|
|
'test-qapi-introspect.h',
|
|
'test-qapi-types-sub-sub-module.c',
|
|
'test-qapi-types-sub-sub-module.h',
|
|
'test-qapi-types.c',
|
|
'test-qapi-types.h',
|
|
'test-qapi-visit-sub-sub-module.c',
|
|
'test-qapi-visit-sub-sub-module.h',
|
|
'test-qapi-visit.c',
|
|
'test-qapi-visit.h',
|
|
]
|
|
|
|
# Problem: to generate trace events, we'd have to add the .trace-events
|
|
# file to qapi_trace_events like we do in qapi/meson.build. Since
|
|
# qapi_trace_events is used by trace/meson.build, we'd have to move
|
|
# subdir('tests') above subdir('trace') in the top-level meson.build.
|
|
# Can't, because it would break the dependency of qga on qemuutil (which
|
|
# depends on trace_ss). Not worth solving now; simply suppress trace
|
|
# event generation instead.
|
|
test_qapi_files = custom_target('Test QAPI files',
|
|
output: test_qapi_outputs,
|
|
input: files('qapi-schema/qapi-schema-test.json',
|
|
'qapi-schema/include/sub-module.json',
|
|
'qapi-schema/sub-sub-module.json'),
|
|
command: [ qapi_gen, '-o', meson.current_build_dir(),
|
|
'-b', '-p', 'test-', '@INPUT0@',
|
|
'--suppress-tracing' ],
|
|
depend_files: qapi_gen_depends)
|
|
|
|
# meson doesn't like generated output in other directories
|
|
# perhaps change qapi_gen to replace / with _, like Meson itself does?
|
|
subdir('include')
|
|
|
|
test_qapi_sources = []
|
|
test_qapi_headers = []
|
|
i = 0
|
|
foreach o: test_qapi_files.to_list() + test_qapi_files_extra.to_list()
|
|
if o.full_path().endswith('.h')
|
|
test_qapi_headers += o
|
|
endif
|
|
test_qapi_sources += o
|
|
endforeach
|
|
|
|
libtestqapi = static_library('testqapi', sources: [genh, test_qapi_sources])
|
|
testqapi = declare_dependency(link_with: libtestqapi, sources: [genh, test_qapi_headers])
|
|
|
|
test_deps = {
|
|
'test-qht-par': qht_bench,
|
|
}
|
|
|
|
if have_tools and have_vhost_user and host_os == 'linux'
|
|
executable('vhost-user-bridge',
|
|
sources: files('vhost-user-bridge.c'),
|
|
dependencies: [qemuutil, vhost_user])
|
|
endif
|
|
|
|
subdir('decode')
|
|
|
|
if 'CONFIG_TCG' in config_all_accel
|
|
subdir('fp')
|
|
subdir('tcg/plugins')
|
|
endif
|
|
|
|
subdir('unit')
|
|
subdir('qapi-schema')
|
|
subdir('qtest')
|
|
subdir('migration')
|
|
subdir('functional')
|