]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: src: build libvirt_test.a static library
authorPavel Hrdina <phrdina@redhat.com>
Wed, 17 Jun 2020 23:00:22 +0000 (01:00 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:27:04 +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>
src/Makefile.am
src/meson.build
src/test/Makefile.inc.am [deleted file]
src/test/meson.build [new file with mode: 0644]

index b99eac910d37d5f977f6f9cb72260a8e856694b9..57549ec254195ed14353ea01ba8f621b4a86f907 100644 (file)
@@ -76,7 +76,6 @@ include access/Makefile.inc.am
 include logging/Makefile.inc.am
 include locking/Makefile.inc.am
 include admin/Makefile.inc.am
-include test/Makefile.inc.am
 include esx/Makefile.inc.am
 include vmx/Makefile.inc.am
 include vmware/Makefile.inc.am
index ead0329a9efb35fa7854ded979a5acb1d9e2a211..2c6758eec9d756cc420a2d347b9f164a7f07538f 100644 (file)
@@ -100,4 +100,5 @@ subdir('admin')
 subdir('esx')
 subdir('hyperv')
 subdir('openvz')
+subdir('test')
 subdir('vmware')
diff --git a/src/test/Makefile.inc.am b/src/test/Makefile.inc.am
deleted file mode 100644 (file)
index c209414..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# vim: filetype=automake
-
-TEST_DRIVER_SOURCES = \
-       test/test_driver.c \
-       test/test_driver.h \
-       $(NULL)
-TEST_DRIVER_ASSETS = test/test-screenshot.png
-
-DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(TEST_DRIVER_SOURCES))
-
-if WITH_TEST
-
-driver_test_asset_DATA = $(TEST_DRIVER_ASSETS)
-driver_test_assetdir = $(pkgdatadir)
-
-noinst_LTLIBRARIES += libvirt_driver_test.la
-libvirt_la_BUILT_LIBADD += libvirt_driver_test.la
-libvirt_driver_test_la_CFLAGS = \
-       -I$(srcdir)/conf \
-       $(AM_CFLAGS) \
-       $(NULL)
-libvirt_driver_test_la_SOURCES = $(TEST_DRIVER_SOURCES)
-endif WITH_TEST
diff --git a/src/test/meson.build b/src/test/meson.build
new file mode 100644 (file)
index 0000000..ec7b123
--- /dev/null
@@ -0,0 +1,24 @@
+test_driver_sources = [
+  'test_driver.c',
+]
+
+test_driver_assets = [
+  'test-screenshot.png',
+]
+
+if conf.has('WITH_TEST')
+  test_lib = static_library(
+    'virt_test',
+    [
+      test_driver_sources,
+    ],
+    dependencies: [
+      src_dep,
+    ],
+    include_directories: [
+      conf_inc_dir,
+    ],
+  )
+
+  install_data(test_driver_assets, install_dir: pkgdatadir)
+endif