tests: esxutilstest: depend on esx_gen_headers

Sometimes parallel compilation randomly fails on platforms
that do not have many drivers enabled, like macOS:

In file included from ../tests/esxutilstest.c:13:
../src/esx/esx_vi_types.h:62:10: fatal error: 'esx_vi_types.generated.typedef' file not found
 #include "esx_vi_types.generated.typedef"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

List esx_gen_headers as a source to stop meson from building
it before the headers are generated.

https://gitlab.com/libvirt/libvirt/-/jobs/726039284

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Ján Tomko 2020-09-23 10:29:56 +02:00
parent 01c620ffc0
commit 02552c2d1e
2 changed files with 6 additions and 1 deletions

View File

@ -81,3 +81,8 @@ else
endif
esx_inc_dir = include_directories('.')
esx_dep = declare_dependency(
include_directories: esx_inc_dir,
sources: esx_gen_headers,
)

View File

@ -356,7 +356,7 @@ endif
if conf.has('WITH_ESX')
tests += [
{ 'name': 'esxutilstest', 'include': [ esx_inc_dir ] },
{ 'name': 'esxutilstest', 'deps': [ esx_dep ] },
]
endif