
On Wed, Sep 23, 2020 at 11:17:44AM +0200, Ján Tomko wrote:
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 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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> --- tests/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/meson.build b/tests/meson.build index f4fbb25e66..8ae201fd69 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -355,8 +355,9 @@ if conf.has('WITH_BHYVE') endif
if conf.has('WITH_ESX') + esxutilstest_sources = [ 'esxutilstest.c', esx_gen_headers ] tests += [ - { 'name': 'esxutilstest', 'include': [ esx_inc_dir ] }, + { 'name': 'esxutilstest', 'sources': esxutilstest_sources, 'include': [ esx_inc_dir ] }, ] endif
You can create esx_dep in src/esx/meson.build: esx_dep = declare_dependency( include_directories: esx_inc_dir, sources: esx_gen_headers, ) and use it in the test file: { 'name': 'esxutilstest', 'deps': [ esx_dep ] }, This way it's ensured that the include and headers are always used together as a single dependency. Pavel