[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt PATCHv2 2/2] 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>
---
 src/esx/meson.build | 5 +++++
 tests/meson.build   | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/esx/meson.build b/src/esx/meson.build
index 3e3d8591e5..2a7fcd54c9 100644
--- a/src/esx/meson.build
+++ b/src/esx/meson.build
@@ -81,3 +81,8 @@ else
 endif
 
 esx_inc_dir = include_directories('.')
+
+esx_dep = declare_dependency(
+  include_directories: esx_inc_dir,
+  sources: esx_gen_headers,
+)
diff --git a/tests/meson.build b/tests/meson.build
index f4fbb25e66..31e8d66c7a 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -356,7 +356,7 @@ endif
 
 if conf.has('WITH_ESX')
   tests += [
-    { 'name': 'esxutilstest', 'include': [ esx_inc_dir ] },
+    { 'name': 'esxutilstest', 'deps': [ esx_dep ] },
   ]
 endif
 
-- 
2.26.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]