meson: tests: add remote specific tests

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
Pavel Hrdina 2020-07-27 11:38:46 +02:00
parent 6e8c0cbf64
commit f18813a6c3
2 changed files with 21 additions and 46 deletions

View File

@ -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 \
@ -215,41 +204,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) \

View File

@ -461,6 +461,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(