Skip to content

Commit

Permalink
meson: tests: add remote specific tests
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Hrdina <[email protected]>
Reviewed-by: Peter Krempa <[email protected]>
Reviewed-by: Neal Gompa <[email protected]>
  • Loading branch information
phrdina committed Aug 3, 2020
1 parent 6e8c0cb commit f18813a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 46 deletions.
46 changes: 0 additions & 46 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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) \
Expand Down
21 changes: 21 additions & 0 deletions tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '@[email protected]'.format(data['name'])
test_bin = executable(
Expand Down

0 comments on commit f18813a

Please sign in to comment.