tests: add missing genh dependency

Fix high-parallelism builds by forcing all generated headers
to be created before tests are compiled.

Reported-by: Claudio Fontana <cfontana@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
Claudio Fontana 2020-09-09 16:37:46 +02:00 committed by Paolo Bonzini
parent cbba3dc6ea
commit 8a5701e54a

View File

@ -56,7 +56,7 @@ test_qapi_files = custom_target('Test QAPI files',
# perhaps change qapi_gen to replace / with _, like Meson itself does? # perhaps change qapi_gen to replace / with _, like Meson itself does?
subdir('include') subdir('include')
libtestqapi = static_library('testqapi', sources: [test_qapi_files, test_qapi_outputs_extra]) libtestqapi = static_library('testqapi', sources: [test_qapi_files, genh, test_qapi_outputs_extra])
testqapi = declare_dependency(link_with: libtestqapi) testqapi = declare_dependency(link_with: libtestqapi)
testblock = declare_dependency(dependencies: [block], sources: 'iothread.c') testblock = declare_dependency(dependencies: [block], sources: 'iothread.c')
@ -232,7 +232,7 @@ foreach test_name, extra: tests
src += test_ss.all_sources() src += test_ss.all_sources()
deps += test_ss.all_dependencies() deps += test_ss.all_dependencies()
endif endif
exe = executable(test_name, src, dependencies: deps) exe = executable(test_name, src, genh, dependencies: deps)
test(test_name, exe, test(test_name, exe,
depends: test_deps.get(test_name, []), depends: test_deps.get(test_name, []),