From 174bd45344b8c1d6f41c2c5541dedbd7731ea485 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 18 Feb 2021 16:08:11 +0100 Subject: [PATCH] build/meson: include meson.build for tests at the end We want that there is a clear hierarchy and dependency between modules/directories. But tests sometimes break that. For example, "shared/nm-glib-aux/tests" link against libnm-glib-aux and libnm-log-null. But "shared/nm-log-null" depends on "shared/nm-glib-aux". Hence, for the test there is a circular dependency. Break that, by including all tests at the end. The alternative would be ugly in different ways. --- src/libnm-core-impl/meson.build | 4 ---- src/meson.build | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libnm-core-impl/meson.build b/src/libnm-core-impl/meson.build index f11dc6df59..df283dd607 100644 --- a/src/libnm-core-impl/meson.build +++ b/src/libnm-core-impl/meson.build @@ -136,7 +136,3 @@ libnm_core_impl_dep_link = declare_dependency( ], link_with: libnm_core_impl, ) - -if enable_tests - subdir('tests') -endif diff --git a/src/meson.build b/src/meson.build index 06e6b5eca0..16ea0ba44c 100644 --- a/src/meson.build +++ b/src/meson.build @@ -13,4 +13,5 @@ subdir('core') if enable_tests subdir('libnm-platform/tests') + subdir('libnm-core-impl/tests') endif