From: Michal Privoznik Date: Tue, 27 Jan 2026 19:43:25 +0000 (+0100) Subject: tests: Avoid crossdir inclusion for networkxml2* tests X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d6f5ac1f31a2fedd6ce2e40932411e446b4e2cd;p=thirdparty%2Flibvirt.git tests: Avoid crossdir inclusion for networkxml2* tests Instead of including network driver header files as: #include "network/header.h" pass network_inc_dir to the compiler and include files directly. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- diff --git a/tests/meson.build b/tests/meson.build index b963047732..4b93fb405a 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -407,9 +407,9 @@ endif if conf.has('WITH_NETWORK') tests += [ - { 'name': 'networkxml2conftest', 'link_with': [ network_driver_impl ] }, - { 'name': 'networkxml2firewalltest', 'link_with': [ network_driver_impl ] }, - { 'name': 'networkxml2xmltest', 'link_with': [ network_driver_impl ] }, + { 'name': 'networkxml2conftest', 'include': [ network_inc_dir ], 'link_with': [ network_driver_impl ] }, + { 'name': 'networkxml2firewalltest', 'include': [ network_inc_dir ], 'link_with': [ network_driver_impl ] }, + { 'name': 'networkxml2xmltest', 'include': [ network_inc_dir ], 'link_with': [ network_driver_impl ], }, ] endif diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c index d18985e060..40b9d07d31 100644 --- a/tests/networkxml2conftest.c +++ b/tests/networkxml2conftest.c @@ -9,7 +9,7 @@ #include "testutils.h" #include "network_conf.h" #include "viralloc.h" -#include "network/bridge_driver.h" +#include "bridge_driver.h" #define LIBVIRT_VIRCOMMANDPRIV_H_ALLOW #include "vircommandpriv.h" diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltest.c index f7b87ff798..e32f1b281e 100644 --- a/tests/networkxml2firewalltest.c +++ b/tests/networkxml2firewalltest.c @@ -27,7 +27,7 @@ # include -# include "network/bridge_driver_platform.h" +# include "bridge_driver_platform.h" # include "virbuffer.h" # include "virmock.h" diff --git a/tests/networkxml2xmltest.c b/tests/networkxml2xmltest.c index 0783d84915..59266defb6 100644 --- a/tests/networkxml2xmltest.c +++ b/tests/networkxml2xmltest.c @@ -8,7 +8,7 @@ #include "internal.h" #include "testutils.h" #include "network_conf.h" -#include "network/bridge_driver.h" +#include "bridge_driver.h" #define VIR_FROM_THIS VIR_FROM_NONE