]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: introduce tests directory
authorPavel Hrdina <phrdina@redhat.com>
Thu, 21 May 2020 14:41:32 +0000 (16:41 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:27:05 +0000 (09:27 +0200)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
meson.build
tests/Makefile.am
tests/meson.build [new file with mode: 0644]

index c5dcba2966ac5336f1c53e8007b5fc1aa4c4847f..a5f97f2ab33eaeb77343decc858feb025a3f2b9a 100644 (file)
@@ -2225,6 +2225,8 @@ subdir('src')
 
 subdir('tools')
 
+subdir('tests')
+
 
 # generate meson-config.h file
 configure_file(output: 'meson-config.h', configuration: conf)
index 00a6276ec050dba81ebbeade1e3ae109ad579383..16b56a2fbe3940823fe270aa7cba744dba7e6e53 100644 (file)
 ## License along with this library.  If not, see
 ## <http://www.gnu.org/licenses/>.
 
-AM_CPPFLAGS = \
-       -I$(top_builddir) -I$(top_srcdir) \
-       -I$(top_builddir)/include -I$(top_srcdir)/include \
-       -I$(top_builddir)/src -I$(top_srcdir)/src \
-       -I$(top_srcdir)/src/util \
-       -I$(top_srcdir)/src/conf \
-       -I$(top_srcdir)/src/hypervisor \
-       -I$(top_builddir)/src/rpc \
-       $(NULL)
-
-WARN_CFLAGS += $(RELAXED_FRAME_LIMIT_CFLAGS)
-
-AM_CFLAGS = \
-       -Dabs_builddir="\"$(abs_builddir)\"" \
-       -Dabs_top_builddir="\"$(abs_top_builddir)\"" \
-       -Dabs_srcdir="\"$(abs_srcdir)\"" \
-       -Dabs_top_srcdir="\"$(abs_top_srcdir)\"" \
-       $(LIBXML_CFLAGS) \
-       $(GLIB_CFLAGS) \
-       $(LIBNL_CFLAGS) \
-       $(GNUTLS_CFLAGS) \
-       $(SASL_CFLAGS) \
-       $(SELINUX_CFLAGS) \
-       $(APPARMOR_CFLAGS) \
-       $(YAJL_CFLAGS) \
-       $(COVERAGE_CFLAGS) \
-       $(XDR_CFLAGS) \
-       $(WARN_CFLAGS)
-
-AM_LDFLAGS = \
-       -export-dynamic
-
 MOCKLIBS_LDFLAGS = -avoid-version \
        -rpath /evil/libtool/hack/to/force/shared/lib/creation \
        $(MINGW_EXTRA_LDFLAGS)
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644 (file)
index 0000000..ab4acbb
--- /dev/null
@@ -0,0 +1,30 @@
+tests_dep = declare_dependency(
+  compile_args: [
+    '-Dabs_builddir="@0@"'.format(meson.current_build_dir()),
+    '-Dabs_top_builddir="@0@"'.format(meson.build_root()),
+    '-Dabs_srcdir="@0@"'.format(meson.current_source_dir()),
+    '-Dabs_top_srcdir="@0@"'.format(meson.source_root()),
+  ] + coverage_flags + cc_flags_relaxed_frame_limit,
+  dependencies: [
+    apparmor_dep,
+    dlopen_dep,
+    glib_dep,
+    gnutls_dep,
+    libnl_dep,
+    libxml_dep,
+    rpc_dep,
+    sasl_dep,
+    selinux_dep,
+    xdr_dep,
+    yajl_dep,
+  ],
+  include_directories: [
+    conf_inc_dir,
+    hypervisor_inc_dir,
+    libvirt_inc,
+    src_inc_dir,
+    top_inc_dir,
+    util_inc_dir,
+  ],
+  link_args: libvirt_export_dynamic,
+)