Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
tests/Makefile.am | 46 ----------------------------------------------
tests/meson.build | 21 +++++++++++++++++++++
2 files changed, 21 insertions(+), 46 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a821b0e0af7..ecc2a76a80f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -16,17 +16,6 @@
## License along with this library. If not, see
## <
http://www.gnu.org/licenses/>.
-if WITH_REMOTE
-test_programs += \
- virnetmessagetest \
- virnetsockettest \
- virnetdaemontest \
- virnetserverclienttest \
- virnettlscontexttest \
- virnettlssessiontest \
- $(NULL)
-endif WITH_REMOTE
-
if WITH_SECDRIVER_SELINUX
if WITH_ATTR
test_programs += securityselinuxtest \
@@ -219,41 +208,6 @@ storagepoolcapstest_SOURCES = \
storagepoolcapstest_LDADD = $(LDADDS)
endif ! WITH_STORAGE
-virnetmessagetest_SOURCES = \
- virnetmessagetest.c testutils.h testutils.c
-virnetmessagetest_LDADD = $(LDADDS)
-
-virnetsockettest_SOURCES = \
- virnetsockettest.c testutils.h testutils.c
-virnetsockettest_LDADD = $(LDADDS)
-
-virnetdaemontest_SOURCES = \
- virnetdaemontest.c \
- testutils.h testutils.c
-virnetdaemontest_LDADD = $(LDADDS)
-
-virnetserverclienttest_SOURCES = \
- virnetserverclienttest.c \
- testutils.h testutils.c
-virnetserverclienttest_LDADD = $(LDADDS)
-
-virnettlscontexttest_SOURCES = \
- virnettlscontexttest.c \
- virnettlshelpers.h virnettlshelpers.c \
- testutils.h testutils.c
-virnettlscontexttest_LDADD = $(LDADDS) $(GNUTLS_LIBS)
-virnettlssessiontest_SOURCES = \
- virnettlssessiontest.c \
- virnettlshelpers.h virnettlshelpers.c \
- testutils.h testutils.c
-virnettlssessiontest_LDADD = $(LDADDS) $(GNUTLS_LIBS)
-if HAVE_LIBTASN1
-virnettlscontexttest_SOURCES += pkix_asn1_tab.c
-virnettlscontexttest_LDADD += -ltasn1
-virnettlssessiontest_SOURCES += pkix_asn1_tab.c
-virnettlssessiontest_LDADD += -ltasn1
-endif ! HAVE_LIBTASN1
-
virstoragetest_SOURCES = \
virstoragetest.c testutils.h testutils.c
virstoragetest_LDADD = $(LDADDS) \
diff --git a/tests/meson.build b/tests/meson.build
index 7a96d11e842..4e01585da11 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -451,6 +451,27 @@ if conf.has('WITH_QEMU')
]
endif
+if conf.has('WITH_REMOTE')
+ tests += [
+ { 'name': 'virnetdaemontest' },
+ { 'name': 'virnetmessagetest' },
+ { 'name': 'virnetserverclienttest' },
+ { 'name': 'virnetsockettest' },
+ ]
+
+ nettls_sources = [ 'virnettlshelpers.c' ]
+ if conf.has('HAVE_LIBTASN1_H')
+ nettls_sources += 'pkix_asn1_tab.c'
+ endif
+
+ libtasn1_dep = cc.find_library('tasn1', required: false)
+
+ tests += [
+ { 'name': 'virnettlscontexttest', 'sources': [
'virnettlscontexttest.c', nettls_sources ], 'deps': [ libtasn1_dep, ] },
+ { 'name': 'virnettlssessiontest', 'sources': [
'virnettlssessiontest.c', nettls_sources ], 'deps': [ libtasn1_dep, ] },
+ ]
+endif
+
foreach data : tests
test_sources = '@0@.c'.format(data['name'])
test_bin = executable(
--
2.26.2